57 lines
2.8 KiB
Lua
57 lines
2.8 KiB
Lua
-- shutdown hyprland and lock
|
|
hl.bind(
|
|
"CTRL + ALT + M",
|
|
hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'"),
|
|
{ description = "hyprland shutdown" }
|
|
)
|
|
hl.bind("CTRL + ALT + L", hl.dsp.exec_cmd(lockscreen))
|
|
-- launchers
|
|
hl.bind("ALT + D", hl.dsp.exec_cmd(fileManager))
|
|
hl.bind("ALT + Q", hl.dsp.exec_cmd(terminal))
|
|
hl.bind("ALT + N", hl.dsp.exec_cmd("kitty -e nvim"))
|
|
hl.bind("ALT + W", hl.dsp.exec_cmd(app_launcher))
|
|
hl.bind("ALT + F", hl.dsp.exec_cmd(browser))
|
|
hl.bind("ALT + Z", hl.dsp.exec_cmd("zotero"))
|
|
-- window management
|
|
hl.bind("ALT + V", hl.dsp.window.float({ action = "toggle" }))
|
|
hl.bind("ALT + F4", hl.dsp.window.kill("activewindow"))
|
|
-- move focus
|
|
hl.bind("ALT + L", hl.dsp.focus({ direction = "right" }))
|
|
hl.bind("ALT + H", hl.dsp.focus({ direction = "left" }))
|
|
hl.bind("ALT + J", hl.dsp.focus({ direction = "up" }))
|
|
hl.bind("ALT + K", hl.dsp.focus({ direction = "down" }))
|
|
-- move window
|
|
hl.bind("CTRL + SUPER + L", hl.dsp.window.move({ direction = "right" }))
|
|
hl.bind("CTRL + SUPER + H", hl.dsp.window.move({ direction = "left" }))
|
|
hl.bind("CTRL + SUPER + K", hl.dsp.window.move({ direction = "up" }))
|
|
hl.bind("CTRL + SUPER + J", hl.dsp.window.move({ direction = "down" }))
|
|
-- move to monitor
|
|
hl.bind("SUPER + A", hl.dsp.focus({ monitor = monitorA }))
|
|
hl.bind("SUPER + B", hl.dsp.focus({ monitor = monitorB }))
|
|
hl.bind("CTRL + SUPER + A", hl.dsp.window.move({ monitor = monitorA }))
|
|
hl.bind("CTRL + SUPER + B", hl.dsp.window.move({ monitor = monitorB }))
|
|
-- change workspace
|
|
hl.bind("SUPER + L", hl.dsp.focus({ workspace = "r+1" }))
|
|
hl.bind("SUPER + H", hl.dsp.focus({ workspace = "r-1" }))
|
|
hl.bind("SUPER + K", hl.dsp.window.move({ workspace = "r+1" }))
|
|
hl.bind("SUPER + J", hl.dsp.window.move({ workspace = "r-1" }))
|
|
-- screenshot
|
|
hl.bind(
|
|
"Print",
|
|
hl.dsp.exec_cmd(
|
|
[[filename="$(date +'%F-%T').png" && grimblast --freeze copysave area "$filename" && mkdir -p ~/Screenshots && mv "$filename" ~/Screenshots/ && nomacs ~/Screenshots/"$filename"]]
|
|
)
|
|
)
|
|
hl.bind("SUPER + V", hl.dsp.exec_cmd("cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy"))
|
|
|
|
-- mouse resize
|
|
hl.bind("ALT + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
|
hl.bind("ALT + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
|
|
|
-- brightness
|
|
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"))
|
|
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"))
|
|
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"))
|
|
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"))
|
|
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"))
|