feat: add Keymap plugin (#68)
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
-- Keymap example for Hyprland's native Lua configuration API.
|
||||
-- This file is documentation and test data; it is not loaded automatically.
|
||||
|
||||
-- 1. Applications
|
||||
hl.bind("SUPER + RETURN", hl.dsp.exec_cmd("foot"), { description = "Open terminal" })
|
||||
hl.bind("SUPER + B", hl.dsp.exec_cmd("firefox"), { description = "Open browser" })
|
||||
hl.bind("SUPER + E", hl.dsp.exec_cmd("xdg-open ."), { description = "Open files" })
|
||||
hl.bind("SUPER + SPACE", hl.dsp.exec_cmd("noctalia msg panel-toggle launcher"), { description = "Open launcher" })
|
||||
hl.bind("SUPER + M", hl.dsp.exec_cmd("thunderbird"), { description = "Open mail" })
|
||||
hl.bind("SUPER + A", hl.dsp.exec_cmd("gnome-calculator"), { description = "Open calculator" })
|
||||
|
||||
-- 2. Windows
|
||||
hl.bind("SUPER + Q", hl.dsp.window.close(), { description = "Close window" })
|
||||
hl.bind("SUPER + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }), { description = "Toggle fullscreen" })
|
||||
hl.bind("SUPER + SHIFT + F", hl.dsp.window.float({ action = "toggle" }), { description = "Toggle floating" })
|
||||
hl.bind("SUPER + LEFT", hl.dsp.focus({ direction = "left" }), { description = "Focus left" })
|
||||
hl.bind("SUPER + RIGHT", hl.dsp.focus({ direction = "right" }), { description = "Focus right" })
|
||||
hl.bind("SUPER + UP", hl.dsp.focus({ direction = "up" }), { description = "Focus up" })
|
||||
hl.bind("SUPER + DOWN", hl.dsp.focus({ direction = "down" }), { description = "Focus down" })
|
||||
hl.bind("SUPER + SHIFT + LEFT", hl.dsp.window.move({ direction = "left" }), { description = "Move window left" })
|
||||
hl.bind("SUPER + SHIFT + RIGHT", hl.dsp.window.move({ direction = "right" }), { description = "Move window right" })
|
||||
hl.bind("SUPER + TAB", hl.dsp.window.cycle_next(), { description = "Focus next window" })
|
||||
|
||||
-- 3. Workspaces
|
||||
hl.bind("SUPER + 1", hl.dsp.focus({ workspace = 1 }), { description = "Workspace 1" })
|
||||
hl.bind("SUPER + 2", hl.dsp.focus({ workspace = 2 }), { description = "Workspace 2" })
|
||||
hl.bind("SUPER + 3", hl.dsp.focus({ workspace = 3 }), { description = "Workspace 3" })
|
||||
hl.bind("SUPER + 4", hl.dsp.focus({ workspace = 4 }), { description = "Workspace 4" })
|
||||
hl.bind("SUPER + SHIFT + 1", hl.dsp.window.move({ workspace = 1, follow = false }), { description = "Move to workspace 1" })
|
||||
hl.bind("SUPER + SHIFT + 2", hl.dsp.window.move({ workspace = 2, follow = false }), { description = "Move to workspace 2" })
|
||||
hl.bind("SUPER + mouse_down", hl.dsp.focus({ workspace = "e+1" }), { description = "Next workspace" })
|
||||
hl.bind("SUPER + mouse_up", hl.dsp.focus({ workspace = "e-1" }), { description = "Previous workspace" })
|
||||
|
||||
-- 4. Screenshots
|
||||
hl.bind("Print", hl.dsp.exec_cmd("grimblast copy output"), { description = "Capture monitor" })
|
||||
hl.bind("SHIFT + Print", hl.dsp.exec_cmd("grimblast copy area"), { description = "Capture region" })
|
||||
hl.bind("CTRL + Print", hl.dsp.exec_cmd("grimblast copy active"), { description = "Capture window" })
|
||||
|
||||
-- 5. Noctalia
|
||||
hl.bind("SUPER + K", hl.dsp.exec_cmd("noctalia msg panel-toggle blackbartblues/keymap:panel"), { description = "Open Keymap" })
|
||||
hl.bind("SUPER + V", hl.dsp.exec_cmd("noctalia msg panel-toggle clipboard"), { description = "Clipboard history" })
|
||||
hl.bind("SUPER + N", hl.dsp.exec_cmd("noctalia msg panel-toggle notifications"), { description = "Notifications" })
|
||||
hl.bind("SUPER + P", hl.dsp.exec_cmd("noctalia msg panel-toggle session-menu"), { description = "Session menu" })
|
||||
|
||||
-- 6. Media
|
||||
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true, description = "Play or pause" })
|
||||
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true, description = "Next track" })
|
||||
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true, description = "Previous track" })
|
||||
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, description = "Mute audio" })
|
||||
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true, description = "Volume up" })
|
||||
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true, description = "Volume down" })
|
||||
|
||||
-- 7. Utilities
|
||||
hl.bind("SUPER + C + V", hl.dsp.exec_cmd("wl-paste | wl-copy"), { release = true, description = "Normalize clipboard" })
|
||||
hl.bind("SUPER + SHIFT + C", hl.dsp.exec_cmd("hyprpicker -a"), { description = "Pick a color" })
|
||||
hl.bind("SUPER + L", hl.dsp.exec_cmd("noctalia msg session lock"), { description = "Lock screen" })
|
||||
@@ -0,0 +1,56 @@
|
||||
# Keymap example for MangoWC.
|
||||
# This file is documentation and test data; it is not loaded automatically.
|
||||
|
||||
# Applications
|
||||
bind=SUPER,Return,spawn_shell,foot #"Open terminal"
|
||||
bind=SUPER,B,spawn_shell,firefox #"Open browser"
|
||||
bind=SUPER,E,spawn_shell,xdg-open . #"Open files"
|
||||
bind=SUPER,Space,spawn_shell,noctalia msg panel-toggle launcher #"Open launcher"
|
||||
bind=SUPER,M,spawn_shell,thunderbird #"Open mail"
|
||||
bind=SUPER,A,spawn_shell,gnome-calculator #"Open calculator"
|
||||
|
||||
# Windows
|
||||
bind=SUPER,Q,killclient, #"Close window"
|
||||
bind=SUPER,F,togglefullscreen, #"Toggle fullscreen"
|
||||
bind=SUPER+SHIFT,F,togglefloating, #"Toggle floating"
|
||||
bind=SUPER,Left,focusdir,left #"Focus left"
|
||||
bind=SUPER,Right,focusdir,right #"Focus right"
|
||||
bind=SUPER,Up,focusdir,up #"Focus up"
|
||||
bind=SUPER,Down,focusdir,down #"Focus down"
|
||||
bind=SUPER+SHIFT,Left,smartmovewin,left #"Move window left"
|
||||
bind=SUPER+SHIFT,Right,smartmovewin,right #"Move window right"
|
||||
bind=SUPER,Tab,focusstack,next #"Focus next window"
|
||||
|
||||
# Workspaces
|
||||
bind=SUPER,1,view,1 #"Workspace 1"
|
||||
bind=SUPER,2,view,2 #"Workspace 2"
|
||||
bind=SUPER,3,view,3 #"Workspace 3"
|
||||
bind=SUPER,4,view,4 #"Workspace 4"
|
||||
bind=SUPER+SHIFT,1,tag,1 #"Move to workspace 1"
|
||||
bind=SUPER+SHIFT,2,tag,2 #"Move to workspace 2"
|
||||
axisbind=SUPER,DOWN,viewtoleft,0 #"Next workspace"
|
||||
axisbind=SUPER,UP,viewtoright,0 #"Previous workspace"
|
||||
|
||||
# Screenshots
|
||||
bind=NONE,Print,spawn_shell,grim ~/Pictures/screenshot.png #"Capture monitor"
|
||||
bind=SHIFT,Print,spawn_shell,grim -g "$(slurp)" ~/Pictures/region.png #"Capture region"
|
||||
bind=CTRL,Print,spawn_shell,grim -g "$(slurp -w)" ~/Pictures/window.png #"Capture window"
|
||||
|
||||
# Noctalia
|
||||
bind=SUPER,K,spawn_shell,noctalia msg panel-toggle blackbartblues/keymap:panel #"Open Keymap"
|
||||
bind=SUPER,V,spawn_shell,noctalia msg panel-toggle clipboard #"Clipboard history"
|
||||
bind=SUPER,N,spawn_shell,noctalia msg panel-toggle notifications #"Notifications"
|
||||
bind=SUPER,P,spawn_shell,noctalia msg panel-toggle session-menu #"Session menu"
|
||||
|
||||
# Media
|
||||
bindl=NONE,XF86AudioPlay,spawn_shell,playerctl play-pause #"Play or pause"
|
||||
bindl=NONE,XF86AudioNext,spawn_shell,playerctl next #"Next track"
|
||||
bindl=NONE,XF86AudioPrev,spawn_shell,playerctl previous #"Previous track"
|
||||
bindl=NONE,XF86AudioMute,spawn_shell,wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle #"Mute audio"
|
||||
bindl=NONE,XF86AudioRaiseVolume,spawn_shell,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ #"Volume up"
|
||||
bindl=NONE,XF86AudioLowerVolume,spawn_shell,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- #"Volume down"
|
||||
|
||||
# Utilities
|
||||
bindr=SUPER+SHIFT,V,spawn_shell,wl-paste | wl-copy #"Normalize clipboard"
|
||||
bind=SUPER+SHIFT,C,spawn_shell,hyprpicker -a #"Pick a color"
|
||||
bind=SUPER,L,spawn_shell,noctalia msg session lock #"Lock screen"
|
||||
@@ -0,0 +1,57 @@
|
||||
// Keymap example for Niri.
|
||||
// This file is documentation and test data; it is not loaded automatically.
|
||||
|
||||
binds {
|
||||
// #"Applications"
|
||||
Mod+Return hotkey-overlay-title="Open terminal" { spawn-sh "foot"; }
|
||||
Mod+B hotkey-overlay-title="Open browser" { spawn-sh "firefox"; }
|
||||
Mod+E hotkey-overlay-title="Open files" { spawn-sh "xdg-open ."; }
|
||||
Mod+Space hotkey-overlay-title="Open launcher" { spawn-sh "noctalia msg panel-toggle launcher"; }
|
||||
Mod+M hotkey-overlay-title="Open mail" { spawn-sh "thunderbird"; }
|
||||
Mod+A hotkey-overlay-title="Open calculator" { spawn-sh "gnome-calculator"; }
|
||||
|
||||
// #"Windows"
|
||||
Mod+Q hotkey-overlay-title="Close window" { close-window; }
|
||||
Mod+F hotkey-overlay-title="Toggle fullscreen" { fullscreen-window; }
|
||||
Mod+Shift+F hotkey-overlay-title="Toggle floating" { toggle-window-floating; }
|
||||
Mod+Left hotkey-overlay-title="Focus left" { focus-column-left; }
|
||||
Mod+Right hotkey-overlay-title="Focus right" { focus-column-right; }
|
||||
Mod+Up hotkey-overlay-title="Focus up" { focus-window-up; }
|
||||
Mod+Down hotkey-overlay-title="Focus down" { focus-window-down; }
|
||||
Mod+Shift+Left hotkey-overlay-title="Move window left" { move-column-left; }
|
||||
Mod+Shift+Right hotkey-overlay-title="Move window right" { move-column-right; }
|
||||
Mod+Tab hotkey-overlay-title="Focus next window" { focus-window-or-workspace-down; }
|
||||
|
||||
// #"Workspaces"
|
||||
Mod+1 hotkey-overlay-title="Workspace 1" { focus-workspace 1; }
|
||||
Mod+2 hotkey-overlay-title="Workspace 2" { focus-workspace 2; }
|
||||
Mod+3 hotkey-overlay-title="Workspace 3" { focus-workspace 3; }
|
||||
Mod+4 hotkey-overlay-title="Workspace 4" { focus-workspace 4; }
|
||||
Mod+Shift+1 hotkey-overlay-title="Move to workspace 1" { move-column-to-workspace 1; }
|
||||
Mod+Shift+2 hotkey-overlay-title="Move to workspace 2" { move-column-to-workspace 2; }
|
||||
Mod+WheelScrollDown hotkey-overlay-title="Next workspace" { focus-workspace-down; }
|
||||
Mod+WheelScrollUp hotkey-overlay-title="Previous workspace" { focus-workspace-up; }
|
||||
|
||||
// #"Screenshots"
|
||||
Print hotkey-overlay-title="Capture monitor" { screenshot-screen; }
|
||||
Shift+Print hotkey-overlay-title="Capture region" { screenshot; }
|
||||
Ctrl+Print hotkey-overlay-title="Capture window" { screenshot-window; }
|
||||
|
||||
// #"Noctalia"
|
||||
Mod+K hotkey-overlay-title="Open Keymap" { spawn-sh "noctalia msg panel-toggle blackbartblues/keymap:panel"; }
|
||||
Mod+V hotkey-overlay-title="Clipboard history" { spawn-sh "noctalia msg panel-toggle clipboard"; }
|
||||
Mod+N hotkey-overlay-title="Notifications" { spawn-sh "noctalia msg panel-toggle notifications"; }
|
||||
Mod+P hotkey-overlay-title="Session menu" { spawn-sh "noctalia msg panel-toggle session-menu"; }
|
||||
|
||||
// #"Media"
|
||||
XF86AudioPlay hotkey-overlay-title="Play or pause" { spawn-sh "playerctl play-pause"; }
|
||||
XF86AudioNext hotkey-overlay-title="Next track" { spawn-sh "playerctl next"; }
|
||||
XF86AudioPrev hotkey-overlay-title="Previous track" { spawn-sh "playerctl previous"; }
|
||||
XF86AudioMute hotkey-overlay-title="Mute audio" { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
||||
XF86AudioRaiseVolume hotkey-overlay-title="Volume up" { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"; }
|
||||
XF86AudioLowerVolume hotkey-overlay-title="Volume down" { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"; }
|
||||
|
||||
// #"Utilities"
|
||||
Mod+Shift+C hotkey-overlay-title="Pick a color" { spawn-sh "hyprpicker -a"; }
|
||||
Mod+L hotkey-overlay-title="Lock screen" { spawn-sh "noctalia msg session lock"; }
|
||||
}
|
||||
Reference in New Issue
Block a user