105 lines
5.0 KiB
Lua
105 lines
5.0 KiB
Lua
-- Set default applications
|
|
local terminal = "kitty"
|
|
local fileManager = "nautilus"
|
|
local menu = "wofi --show drun, run"
|
|
local lockscreen = "hyprlock"
|
|
|
|
-- open Software
|
|
hl.bind("SUPER + SHIFT + Q", hl.dsp.exec_cmd("firefox"))
|
|
hl.bind("SUPER+RETURN", hl.dsp.exec_cmd(terminal))
|
|
hl.bind("SUPER+D", hl.dsp.exec_cmd(menu))
|
|
hl.bind("SUPER+E", hl.dsp.exec_cmd(fileManager))
|
|
hl.bind("SUPER+L", hl.dsp.exec_cmd(lockscreen), { locked = true })
|
|
|
|
-- Hyprland hl.binds
|
|
|
|
-- Manipulating Windows/Software
|
|
hl.bind("SUPER+W", hl.dsp.window.close())
|
|
hl.bind("SUPER+Q", hl.dsp.window.close())
|
|
hl.bind("SUPER+F", hl.dsp.window.fullscreen)
|
|
hl.bind("SUPER+V", hl.dsp.window.float({ action = "toggle" }))
|
|
hl.bind("SUPER+SHIFT+D", hl.dsp.window.pseudo)
|
|
|
|
-- Interacting with Workspaces
|
|
for i = 1, 9 do
|
|
hl.bind("SUPER+" .. tostring(i), hl.dsp.focus({ workspace = tostring(i) }))
|
|
hl.bind("SUPER+CTRL+" .. tostring(i), hl.dsp.window.move({workspace = tostring(i), follow = false}))
|
|
hl.bind("SUPER+SHIFT+" .. tostring(i), hl.dsp.window.move({workspace = tostring(i), follow = true}))
|
|
end
|
|
|
|
hl.bind("SUPER+0", hl.dsp.focus({ workspace = "10" }))
|
|
hl.bind("SUPER+CTRL+0", hl.dsp.window.move({workspace = "10", follow = false}))
|
|
hl.bind("SUPER+SHIFT+0", hl.dsp.window.move({workspace = "10", follow = true}))
|
|
hl.bind("SUPER+F1", hl.dsp.focus({ workspace = "401" }))
|
|
hl.bind("SUPER+CTRL+F1", hl.dsp.window.move({workspace = "401", follow = false}))
|
|
hl.bind("SUPER+SHIFT+F1", hl.dsp.window.move({workspace = "401", follow = true}))
|
|
|
|
-- -- Scrolling
|
|
-- hl.bind("SUPER+CTRL+left", hl.dsp.layout(move = "+col"))
|
|
-- hl.bind("SUPER+CTRL+right", hl.dsp.layout(move = "-col"))
|
|
-- hl.bind("SUPER+CTRL+SHIFT+left", hl.dsp.layout(swapcol = "l"))
|
|
-- hl.bind("SUPER+CTRL+SHIFT+right", hl.dsp.layout(swapcol = "r"))
|
|
|
|
-- -- Resizing windows
|
|
-- hl.bind("SUPER+SHIFT+right", "resizeactive", "30 0")
|
|
-- hl.bind("SUPER+SHIFT+left", "resizeactive", "-30 0")
|
|
-- hl.bind("SUPER+SHIFT+up", "resizeactive", "0 -30")
|
|
-- hl.bind("SUPER+SHIFT+down", "resizeactive", "0 30")
|
|
|
|
-- Mouse Commands for moving windows
|
|
-- hl.bind("SUPER+mouse_down", "workspace", "e+1")
|
|
-- hl.bind("SUPER+mouse_up", "workspace", "e-1")
|
|
hl.bind("SUPER + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
|
hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
|
hl.bind("SUPER + SHIFT + mouse:272", hl.dsp.window.resize(), { mouse = true })
|
|
|
|
-- Move between workspaces/screens
|
|
hl.bind("SUPER+left" , hl.dsp.focus({ direction = "l" }))
|
|
hl.bind("SUPER+right", hl.dsp.focus({ direction = "r" }))
|
|
hl.bind("SUPER+up" , hl.dsp.focus({ direction = "u" }))
|
|
hl.bind("SUPER+down" , hl.dsp.focus({ direction = "d" }))
|
|
hl.bind("SUPER+TAB" , hl.dsp.focus({ workspace = "e+1", on_current_monitor = true }))
|
|
|
|
-- Screenshots
|
|
hl.bind("SUPER+P", hl.dsp.exec_cmd("~/.config/hypr/scripts/screenshot/screenshot_window.sh"))
|
|
hl.bind("SUPER+ALT+P", hl.dsp.exec_cmd("~/.config/hypr/scripts/screenshot/screenshot_monitor.sh"))
|
|
hl.bind("SUPER+SHIFT+P", hl.dsp.exec_cmd("~/.config/hypr/scripts/screenshot/screenshot_area.sh"))
|
|
hl.bind("SUPER+SHIFT+S", hl.dsp.exec_cmd("~/.config/hypr/scripts/screenshot/screenshot_area_2.sh"))
|
|
|
|
-- Audio Control
|
|
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"))
|
|
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"))
|
|
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"))
|
|
|
|
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause || playerctl play-pause"))
|
|
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"))
|
|
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"))
|
|
|
|
-- German Umlaute
|
|
hl.bind("SUPER+a", hl.dsp.exec_cmd("wtype \"ä\""))
|
|
hl.bind("SUPER+SHIFT+a", hl.dsp.exec_cmd("wtype \"Ä\""))
|
|
hl.bind("SUPER+o", hl.dsp.exec_cmd("wtype \"ö\""))
|
|
hl.bind("SUPER+SHIFT+o", hl.dsp.exec_cmd("wtype \"Ö\""))
|
|
hl.bind("SUPER+u", hl.dsp.exec_cmd("wtype \"ü\""))
|
|
hl.bind("SUPER+SHIFT+u", hl.dsp.exec_cmd("wtype \"Ü\""))
|
|
hl.bind("SUPER+s", hl.dsp.exec_cmd("wtype \"ß\""))
|
|
hl.bind("SUPER+SHIFT+e", hl.dsp.exec_cmd("wtype \"€\""))
|
|
|
|
-- Opening coder
|
|
hl.bind("SUPER+SHIFT+C", hl.dsp.exec_cmd("code"))
|
|
hl.bind("SUPER+SHIFT+V", hl.dsp.exec_cmd("vscodium"))
|
|
|
|
-- device specifics
|
|
if HOSTNAME == "archlinux-hypr" then
|
|
for i = 1, 12 do
|
|
hl.bind("SUPER+SHIFT+CTRL+F"..tostring(i), hl.dsp.exec_cmd("~/.config/hypr/scripts/makropad/button"..string.format("%02d", i)..".sh"))
|
|
end
|
|
hl.bind("ALT+T", hl.dsp.exec_cmd("~/.config/hypr/scripts/writing/todo.sh"))
|
|
hl.bind("ALT+Y", hl.dsp.exec_cmd("~/.config/hypr/scripts/writing/tmdb.sh"))
|
|
end
|
|
|
|
-- Quickshell
|
|
hl.bind("SUPER + SHIFT + W", hl.dsp.global("quickshell:Wallpaper"))
|
|
hl.bind("SUPER + SHIFT + J", hl.dsp.global("quickshell:JLearner"))
|
|
hl.bind("SUPER + SHIFT + L", hl.dsp.global("quickshell:WLogout"))
|
|
hl.bind("escape", hl.dsp.global("quickshell:Closer")) |