84 lines
3.0 KiB
Lua
84 lines
3.0 KiB
Lua
local mainMod = "SUPER"
|
|
|
|
local terminal = "kitty"
|
|
local browser = "flatpak run app.zen_browser.zen"
|
|
local fileManager = "dolphin"
|
|
local menu = "dms ipc call spotlight open"
|
|
local calculator = "kcalc"
|
|
|
|
|
|
hl.bind(mainMod .. " + RETURN", hl.dsp.exec_cmd(terminal))
|
|
hl.bind(mainMod .. " + B", hl.dsp.exec_cmd(browser))
|
|
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
|
|
hl.bind(mainMod .. " + SPACE", hl.dsp.exec_cmd(menu))
|
|
|
|
local closeWindowBind = hl.bind(mainMod .. " + Q", hl.dsp.window.close())
|
|
|
|
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ action = "toggle" }))
|
|
hl.bind(mainMod .. " + M", hl.dsp.window.fullscreen({ mode = "maximized" }))
|
|
hl.bind(mainMod .. " + T", hl.dsp.window.float({action = "toggle"}))
|
|
|
|
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 .. " + K", hl.dsp.window.swap({ prev = 1 }))
|
|
hl.bind(mainMod .. " + J", hl.dsp.window.swap({ direction = "down" }))
|
|
|
|
hl.bind(mainMod .. " + L", hl.dsp.exec_cmd("dms ipc call lock lock"))
|
|
hl.bind(mainMod .. " + CTRL + Q", hl.dsp.exec_cmd("dms ipc call powermenu open"))
|
|
|
|
hl.bind(mainMod .. " + CTRL + R", hl.dsp.exec_cmd("hyprctl reload"))
|
|
|
|
|
|
|
|
-- Specialized Keybinds (such as play, volume up/down, etc)
|
|
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -q s +10%"))
|
|
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -q s 10-%"))
|
|
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("pactl set-sink-mute @DEFAULT_SINK@ toggle"))
|
|
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"))
|
|
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl pause"))
|
|
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"))
|
|
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"))
|
|
hl.bind("code:238", hl.dsp.exec_cmd("brightnessctl -d smc::kbd_backlight s +10"))
|
|
hl.bind("XF86Calculator", hl.dsp.exec_cmd(calculator))
|
|
|
|
-- Grouping Related submaps
|
|
hl.bind(mainMod .. " + G", hl.dsp.submap("group"))
|
|
|
|
hl.define_submap("group", function()
|
|
hl.bind(mainMod .. " + G", function()
|
|
hl.dsp.group.toggle()
|
|
hl.dsp.submap("reset")
|
|
end)
|
|
|
|
hl.bind("H", function()
|
|
hl.dsp.window.move({ into_or_create_group = "left" })
|
|
hl.dsp.submap("reset")
|
|
end)
|
|
|
|
hl.bind("L", function()
|
|
hl.dsp.window.move({into_or_create_group = "right" })
|
|
hl.dsp.submap("reset")
|
|
end)
|
|
|
|
hl.bind("K", function()
|
|
hl.dsp.window.move({into_or_create_group = "up"})
|
|
hl.dsp.submap("reset")
|
|
end)
|
|
|
|
hl.bind("J", function()
|
|
hl.dsp.window.move({into_or_create_group = "down"})
|
|
hl.dsp.submap("reset")
|
|
end)
|
|
|
|
hl.bind("bracketleft", hl.dsp.group.prev())
|
|
hl.bind("bracketright", hl.dsp.group.next())
|
|
|
|
hl.bind("ESCAPE", hl.dsp.submap("reset"))
|
|
end)
|
|
|
|
hl.on("keybinds.submap", function (n)
|
|
hl.notification.create({ text = "Entered submap: " .. n, timeout = 5000, icon = "ok"})
|
|
end)
|