268 lines
15 KiB
Lua
268 lines
15 KiB
Lua
-- https://wiki.hypr.land/Configuring/Basics/Binds/
|
|
|
|
local mainMod = "SUPER"
|
|
|
|
local terminal = "kitty"
|
|
local fileManager = "thunar"
|
|
local editor = "kitty nvim"
|
|
local menu = "vicinae toggle"
|
|
local winswitch = "" -- TODO: define your window switcher command
|
|
|
|
--------------------
|
|
---- LID SWITCH ----
|
|
--------------------
|
|
|
|
hl.bind("switch:on:Lid Switch", hl.dsp.exec_cmd("systemctl suspend &"), { locked = true })
|
|
hl.bind("switch:off:Lid Switch", hl.dsp.exec_cmd("hyprctl dispatch exec hyprlock"), { locked = true })
|
|
|
|
--------------------
|
|
---- GESTURES ------
|
|
--------------------
|
|
|
|
hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })
|
|
-- TODO: verify dispatcher syntax for non-built-in gesture actions in Lua:
|
|
-- gesture = 3, up, dispatcher, movetoworkspacesilent, special:magic
|
|
-- gesture = 3, down, special, magic
|
|
-- gesture = 3, pinchin, dispatcher, exec, $menu
|
|
-- gesture = 3, pinchout, float
|
|
-- gesture = 4, pinchout, close
|
|
-- gesture = 4, pinchin, dispatcher, exec, $terminal
|
|
-- gesture = 4, down, dispatcher, movetoworkspace, special:magic
|
|
-- gesture = 4, up, dispatcher, movetoworkspace, r+0
|
|
-- gesture = 4, left, dispatcher, movetoworkspace, r+1
|
|
-- gesture = 4, right, dispatcher, movetoworkspace, r-1
|
|
|
|
--------------------
|
|
---- APPS ----------
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + T", hl.dsp.exec_cmd(terminal))
|
|
hl.bind(mainMod .. " + SHIFT + T", hl.dsp.exec_cmd("cool-retro-term -p ~/Dotfiles/desktopenvs/hyprlua/CRT"))
|
|
hl.bind(mainMod .. " + M", hl.dsp.exec_cmd(editor))
|
|
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
|
|
hl.bind(mainMod .. " + ALT + E", hl.dsp.exec_cmd("pcmanfm-qt"))
|
|
hl.bind(mainMod .. " + X", hl.dsp.exec_cmd("wofi --show=run"))
|
|
hl.bind(mainMod .. " + N", hl.dsp.exec_cmd("nextcloud"))
|
|
hl.bind(mainMod .. " + I", hl.dsp.exec_cmd("iwmenu --launcher walker"))
|
|
hl.bind(mainMod .. " + ALT + I", hl.dsp.exec_cmd("bzmenu --launcher walker"))
|
|
hl.bind(mainMod .. " + SHIFT + I", hl.dsp.exec_cmd("[tag +mixer] nm-connection-editor"))
|
|
hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu))
|
|
hl.bind(mainMod .. " + RETURN", hl.dsp.exec_cmd(menu))
|
|
hl.bind(mainMod .. " + SHIFT + RETURN", hl.dsp.exec_cmd(winswitch))
|
|
hl.bind(mainMod .. " + SHIFT + R", hl.dsp.exec_cmd("wofi --show drun"))
|
|
hl.bind("CTRL + SHIFT + R", hl.dsp.exec_cmd(menu))
|
|
|
|
hl.bind(mainMod .. " + F", hl.dsp.exec_cmd("~/.config/scripts/wofi-file-search.sh"))
|
|
hl.bind(mainMod .. " + SHIFT + F", hl.dsp.exec_cmd("~/.config/scripts/foldersearch.sh"))
|
|
hl.bind(mainMod .. " + ALT + F", hl.dsp.exec_cmd("wofi-calc"))
|
|
|
|
hl.bind(mainMod .. " + S", hl.dsp.exec_cmd("[tag +mixer] pavucontrol"))
|
|
hl.bind(mainMod .. " + U", hl.dsp.exec_cmd("[tag +centered-L] kitty btop"))
|
|
hl.bind(mainMod .. " + W", hl.dsp.exec_cmd("[tag +centered-L] kitty -e ~/.config/scripts/wallpaper-picker ~/Pictures"))
|
|
hl.bind(mainMod .. " + CTRL + R", hl.dsp.exec_cmd("[tag +centered-L] kitty -e ~/.config/scripts/amssh"))
|
|
hl.bind(mainMod .. " + F1", hl.dsp.exec_cmd("[tag +centered] kitty ~/.config/scripts/helpmenu.sh"))
|
|
hl.bind(mainMod .. " + CTRL + T", hl.dsp.exec_cmd("[tag +centered-S] kitty bash ~/.config/scripts/timer-pick"))
|
|
hl.bind(mainMod .. " + SHIFT + F1", hl.dsp.exec_cmd("[tag +centered-L] kitty nvim ~/.config/binds.lua"))
|
|
|
|
hl.bind(mainMod .. " + CTRL + P", hl.dsp.exec_cmd("~/.config/scripts/screenrec.sh"))
|
|
|
|
--------------------
|
|
---- WINDOW MGMT ---
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + Q", hl.dsp.window.close())
|
|
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
|
|
hl.bind(mainMod .. " + C", hl.dsp.window.pseudo())
|
|
hl.bind(mainMod .. " + SHIFT + V", hl.dsp.window.tag("+centered")) -- TODO: verify hl.dsp.window.tag() API
|
|
hl.bind(mainMod .. " + SHIFT + Q", hl.dsp.exec_cmd("hyprctl kill"))
|
|
|
|
hl.bind(mainMod .. " + CTRL + M", hl.dsp.exec_cmd("~/.config/scripts/toggle-layout.sh"))
|
|
|
|
-- lock/exit
|
|
hl.bind(mainMod .. " + O", hl.dsp.exec_cmd("hyprlock"))
|
|
hl.bind(mainMod .. " + SHIFT + O", hl.dsp.exec_cmd("hyprctl dispatch exit"))
|
|
hl.bind(mainMod .. " + CTRL + O", hl.dsp.exec_cmd("systemctl poweroff"))
|
|
hl.bind(mainMod .. " + ALT + O", hl.dsp.exec_cmd("~/.config/scripts/pwr-dmenu.sh"))
|
|
hl.bind(mainMod .. " + ALT + CTRL + SHIFT + END", hl.dsp.exit())
|
|
|
|
-- bar / ui
|
|
hl.bind(mainMod .. " + Z", hl.dsp.exec_cmd("~/.config/scripts/togglebar.sh"))
|
|
hl.bind(mainMod .. " + CTRL + B", hl.dsp.exec_cmd("eww reload"))
|
|
|
|
--------------------
|
|
---- FOCUS ---------
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + h", hl.dsp.focus({ direction = "left" }))
|
|
hl.bind(mainMod .. " + l", hl.dsp.focus({ direction = "right" }))
|
|
hl.bind(mainMod .. " + k", hl.dsp.focus({ direction = "up" }))
|
|
hl.bind(mainMod .. " + j", hl.dsp.focus({ direction = "down" }))
|
|
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" }))
|
|
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" }))
|
|
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" }))
|
|
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" }))
|
|
|
|
hl.bind(mainMod .. " + TAB", hl.dsp.focus({ cycle = true })) -- TODO: verify cycle focus API
|
|
hl.bind(mainMod .. " + SHIFT + TAB", hl.dsp.exec_cmd(winswitch))
|
|
|
|
--------------------
|
|
---- MOVE WINDOW ---
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" }))
|
|
hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.move({ direction = "right" }))
|
|
hl.bind(mainMod .. " + SHIFT + up", hl.dsp.window.move({ direction = "up" }))
|
|
hl.bind(mainMod .. " + SHIFT + down", hl.dsp.window.move({ direction = "down" }))
|
|
hl.bind(mainMod .. " + SHIFT + h", hl.dsp.window.move({ direction = "left" }))
|
|
hl.bind(mainMod .. " + SHIFT + l", hl.dsp.window.move({ direction = "right" }))
|
|
hl.bind(mainMod .. " + SHIFT + k", hl.dsp.window.move({ direction = "up" }))
|
|
hl.bind(mainMod .. " + SHIFT + j", hl.dsp.window.move({ direction = "down" }))
|
|
|
|
-- mouse drag / resize
|
|
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
|
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
|
hl.bind(mainMod .. " + SHIFT + mouse:272", hl.dsp.window.resize(), { mouse = true })
|
|
|
|
--------------------
|
|
---- RESIZE --------
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + ALT + right", hl.dsp.window.resize({ delta = "10 0" }), { repeating = true }) -- TODO: verify resize delta API
|
|
hl.bind(mainMod .. " + ALT + left", hl.dsp.window.resize({ delta = "-10 0" }), { repeating = true })
|
|
hl.bind(mainMod .. " + ALT + up", hl.dsp.window.resize({ delta = "0 -10" }), { repeating = true })
|
|
hl.bind(mainMod .. " + ALT + down", hl.dsp.window.resize({ delta = "0 10" }), { repeating = true })
|
|
hl.bind(mainMod .. " + ALT + l", hl.dsp.window.resize({ delta = "10 0" }), { repeating = true })
|
|
hl.bind(mainMod .. " + ALT + h", hl.dsp.window.resize({ delta = "-10 0" }), { repeating = true })
|
|
hl.bind(mainMod .. " + ALT + k", hl.dsp.window.resize({ delta = "0 -10" }), { repeating = true })
|
|
hl.bind(mainMod .. " + ALT + j", hl.dsp.window.resize({ delta = "0 10" }), { repeating = true })
|
|
|
|
--------------------
|
|
---- WORKSPACES ----
|
|
--------------------
|
|
|
|
for i = 1, 9 do
|
|
hl.bind(mainMod .. " + " .. i, hl.dsp.focus({ workspace = i }))
|
|
hl.bind(mainMod .. " + SHIFT + " .. i, hl.dsp.window.move({ workspace = i }))
|
|
end
|
|
hl.bind(mainMod .. " + 0", hl.dsp.focus({ workspace = 10 }))
|
|
hl.bind(mainMod .. " + SHIFT + 0", hl.dsp.window.move({ workspace = 10 }))
|
|
|
|
-- relative workspace nav — arrows
|
|
hl.bind(mainMod .. " + CTRL + right", hl.dsp.focus({ workspace = "r+1" }))
|
|
hl.bind(mainMod .. " + CTRL + left", hl.dsp.focus({ workspace = "r-1" }))
|
|
hl.bind(mainMod .. " + CTRL + SHIFT + right", hl.dsp.window.move({ workspace = "r+1" }))
|
|
hl.bind(mainMod .. " + CTRL + SHIFT + left", hl.dsp.window.move({ workspace = "r-1" }))
|
|
|
|
-- relative workspace nav — vim
|
|
hl.bind(mainMod .. " + CTRL + l", hl.dsp.focus({ workspace = "r+1" }))
|
|
hl.bind(mainMod .. " + CTRL + h", hl.dsp.focus({ workspace = "r-1" }))
|
|
hl.bind(mainMod .. " + CTRL + SHIFT + l", hl.dsp.window.move({ workspace = "r+1" }))
|
|
hl.bind(mainMod .. " + CTRL + SHIFT + h", hl.dsp.window.move({ workspace = "r-1" }))
|
|
|
|
-- scroll through workspaces
|
|
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "r+1" }))
|
|
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "r-1" }))
|
|
|
|
-- volume keys as workspace nav (when mainMod held)
|
|
hl.bind(mainMod .. " + XF86AudioRaiseVolume", hl.dsp.focus({ workspace = "r+1" }), { repeating = true })
|
|
hl.bind(mainMod .. " + XF86AudioLowerVolume", hl.dsp.focus({ workspace = "r-1" }), { repeating = true })
|
|
hl.bind(mainMod .. " + SHIFT + XF86AudioRaiseVolume", hl.dsp.window.move({ workspace = "r+1" }))
|
|
hl.bind(mainMod .. " + SHIFT + XF86AudioLowerVolume", hl.dsp.window.move({ workspace = "r-1" }))
|
|
|
|
--------------------
|
|
---- SCRATCHPAD ----
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + SPACE", hl.dsp.workspace.toggle_special("magic"))
|
|
hl.bind(mainMod .. " + SHIFT + SPACE", hl.dsp.window.move({ workspace = "special:magic" }))
|
|
hl.bind(mainMod .. " + CTRL + up", hl.dsp.workspace.toggle_special("magic"))
|
|
hl.bind(mainMod .. " + CTRL + SHIFT + up", hl.dsp.window.move({ workspace = "special:magic" }))
|
|
hl.bind(mainMod .. " + CTRL + SHIFT + down", hl.dsp.window.move({ workspace = "empty" }))
|
|
hl.bind(mainMod .. " + CTRL + down", hl.dsp.window.move({ workspace = "special:magic", silent = true }))
|
|
hl.bind(mainMod .. " + CTRL + k", hl.dsp.workspace.toggle_special("magic"))
|
|
hl.bind(mainMod .. " + CTRL + j", hl.dsp.window.move({ workspace = "special:magic", silent = true }))
|
|
hl.bind(mainMod .. " + CTRL + SHIFT + j", hl.dsp.window.move({ workspace = "r+0" }))
|
|
hl.bind(mainMod .. " + CTRL + SHIFT + k", hl.dsp.window.move({ workspace = "special:magic" }))
|
|
hl.bind(mainMod .. " + XF86AudioMute", hl.dsp.workspace.toggle_special("magic"), { repeating = true })
|
|
hl.bind(mainMod .. " + SHIFT + XF86AudioMute", hl.dsp.window.move({ workspace = "special:magic" }), { repeating = true })
|
|
|
|
--------------------
|
|
---- GROUPS --------
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + ALT + C", hl.dsp.group.toggle()) -- TODO: verify hl.dsp.group API
|
|
hl.bind(mainMod .. " + CTRL + SHIFT + C", hl.dsp.group.lock_active("toggle"))
|
|
hl.bind(mainMod .. " + A", hl.dsp.group.change_active("f"))
|
|
hl.bind(mainMod .. " + Y", hl.dsp.group.change_active("b"))
|
|
|
|
hl.bind(mainMod .. " + SHIFT + ALT + left", hl.dsp.group.move_window("l"))
|
|
hl.bind(mainMod .. " + SHIFT + ALT + right", hl.dsp.group.move_window("r"))
|
|
hl.bind(mainMod .. " + SHIFT + ALT + up", hl.dsp.group.move_window("u"))
|
|
hl.bind(mainMod .. " + SHIFT + ALT + down", hl.dsp.group.move_window("d"))
|
|
hl.bind(mainMod .. " + SHIFT + ALT + h", hl.dsp.group.move_window("l"))
|
|
hl.bind(mainMod .. " + SHIFT + ALT + l", hl.dsp.group.move_window("r"))
|
|
hl.bind(mainMod .. " + SHIFT + ALT + k", hl.dsp.group.move_window("u"))
|
|
hl.bind(mainMod .. " + SHIFT + ALT + j", hl.dsp.group.move_window("d"))
|
|
|
|
--------------------
|
|
---- NWG-DOCK ------
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + SHIFT + W", hl.dsp.exec_cmd("killall nwg-dock-hyprland && nwg-dock-hyprland -c ~/.config/scripts/drawer.sh -ml 15 -r -s style.css -p left"))
|
|
hl.bind(mainMod .. " + SHIFT + E", hl.dsp.exec_cmd("killall nwg-dock-hyprland && nwg-dock-hyprland -c ~/.config/scripts/drawer.sh -mr 15 -r -s style.css -p right"))
|
|
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd("killall nwg-dock-hyprland && nwg-dock-hyprland -c ~/.config/scripts/drawer.sh -mt 80 -r -s style.css -p top"))
|
|
hl.bind(mainMod .. " + SHIFT + D", hl.dsp.exec_cmd("killall nwg-dock-hyprland && nwg-dock-hyprland -c ~/.config/scripts/drawer.sh -mb 15 -r -s style.css -p bottom"))
|
|
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd("nwg-dock-hyprland"), { release = true })
|
|
hl.bind(mainMod .. " + SHIFT + A", hl.dsp.exec_cmd("~/.config/scripts/drawer.sh"))
|
|
|
|
--------------------
|
|
---- SCREENSHOT ----
|
|
--------------------
|
|
|
|
hl.bind("Print", hl.dsp.exec_cmd("~/.config/scripts/screenshot.sh"))
|
|
hl.bind(mainMod .. " + P", hl.dsp.exec_cmd("~/.config/scripts/screenshot.sh"))
|
|
hl.bind(mainMod .. " + SHIFT + P", hl.dsp.exec_cmd("hyprpicker | wl-copy"))
|
|
hl.bind(mainMod .. " + CTRL + P", hl.dsp.exec_cmd("~/.config/scripts/screenrec.sh"))
|
|
|
|
--------------------
|
|
---- AUDIO ---------
|
|
--------------------
|
|
|
|
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+"), { repeating = true })
|
|
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"), { repeating = true })
|
|
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"))
|
|
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"))
|
|
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause -p spotify,vlc"), { locked = true })
|
|
|
|
--------------------
|
|
---- BRIGHTNESS ----
|
|
--------------------
|
|
|
|
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("bri --up"), { locked = true, repeating = true })
|
|
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("bri --down"), { locked = true, repeating = true })
|
|
|
|
--------------------
|
|
---- HYPRSUNSET ----
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + CTRL + W", hl.dsp.exec_cmd("hyprctl hyprsunset gamma +10"))
|
|
hl.bind(mainMod .. " + CTRL + S", hl.dsp.exec_cmd("hyprctl hyprsunset gamma -10"))
|
|
hl.bind(mainMod .. " + CTRL + A", hl.dsp.exec_cmd("hyprctl hyprsunset temperature +450"))
|
|
hl.bind(mainMod .. " + CTRL + Q", hl.dsp.exec_cmd("hyprctl hyprsunset temperature -450"))
|
|
hl.bind(mainMod .. " + CTRL + X", hl.dsp.exec_cmd("hyprctl hyprsunset identity"))
|
|
|
|
--------------------
|
|
---- MISC ----------
|
|
--------------------
|
|
|
|
hl.bind(mainMod .. " + CTRL + I", hl.dsp.exec_cmd("chamel toggle"))
|
|
hl.bind(mainMod .. " + CTRL + U", hl.dsp.exec_cmd("chamel clear"))
|
|
hl.bind(mainMod .. " + CTRL + Z", hl.dsp.exec_cmd("chamel clear-and-deactivate"))
|
|
hl.bind(mainMod .. " + CTRL + C", hl.dsp.exec_cmd("dunstctl close-all"))
|
|
hl.bind(mainMod .. " + CTRL + G", hl.dsp.exec_cmd("~/.config/scripts/onscreenkb.sh"))
|
|
hl.bind(mainMod .. " + SHIFT + C", hl.dsp.exec_cmd("~/.config/scripts/caffeine.sh"))
|
|
hl.bind(mainMod .. " + SHIFT + X", hl.dsp.exec_cmd("~/.config/scripts/hyprland-toggle-touchpad.sh"))
|
|
|
|
hl.bind(mainMod .. " + CTRL + E", hl.dsp.exec_cmd("~/.config/scripts/screenrotationwcw.sh"))
|
|
hl.bind(mainMod .. " + CTRL + D", hl.dsp.exec_cmd("~/.config/scripts/screenrotationacw.sh"))
|