feat: hyprland binds, some window rules, other small feats

This commit is contained in:
2026-06-13 18:08:00 +02:00
parent a253ce56b7
commit 6e35326906
18 changed files with 414 additions and 57 deletions
+33 -8
View File
@@ -1,10 +1,35 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
return function(is_laptop)
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.define_submap("launch", function()
hl.bind("l", function()
hl.dispatch(hl.dsp.exec_cmd("librewolf"))
exit_submap()
hl.define_submap("device", function()
hl.bind("m", function()
hl.dispatch(hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"))
exit_submap()
end)
if is_laptop then
hl.bind("d", function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Set to mirror internal display' --app-name'Hyprctl'"))
hl.monitor({
output = "HDMI-A-1",
mirror = "eDP-1",
})
exit_submap()
end)
hl.bind("e", function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Set to expand internal display' --app-name'Hyprctl'"))
hl.monitor({
output = "HDMI-A-1",
mirror = "",
})
exit_submap()
end)
end
hl.bind("Escape", function()
exit_submap()
end)
end)
end)
end
+42
View File
@@ -0,0 +1,42 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.bind("Super + Q", hl.dsp.exit())
hl.define_submap("groups", function()
hl.bind("c", function()
hl.dispatch(hl.dsp.group.toggle())
exit_submap()
end)
hl.bind("l", function()
hl.dispatch(hl.dsp.group.next())
exit_submap()
end)
hl.bind("h", function()
hl.dispatch(hl.dsp.group.prev())
exit_submap()
end)
hl.bind("Ctrl + L", function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Group locking toggled' --app-name='Hyprtclt'"))
hl.dispatch(hl.dsp.group.lock_active())
exit_submap()
end)
hl.bind("Shift + L", function()
hl.dispatch(hl.dsp.window.move({ into_or_create_group = "r" }))
exit_submap()
end)
hl.bind("Shift + H", function()
hl.dispatch(hl.dsp.window.move({ into_or_create_group = "l" }))
exit_submap()
end)
hl.bind("Escape", function()
exit_submap()
end)
end)
+19 -48
View File
@@ -2,76 +2,47 @@ local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
local function launcher(program)
return function ()
hl.dispatch(hl.dsp.exec_cmd(program))
exit_submap()
end
end
hl.define_submap("launch", function()
-- Librewolf
hl.bind("l", function()
hl.dispatch(hl.dsp.exec_cmd("librewolf"))
exit_submap()
end)
hl.bind("l", launcher("librewolf"))
-- Steam
hl.bind("s", function()
hl.dispatch(hl.dsp.exec_cmd("steam"))
exit_submap()
end)
hl.bind("s", launcher("steam"))
-- Discord
hl.bind("d", function()
hl.dispatch(hl.dsp.exec_cmd("vesktop"))
exit_submap()
end)
hl.bind("d", launcher("vesktop"))
-- Kitty
hl.bind("k", function()
hl.dispatch(hl.dsp.exec_cmd("kitty"))
exit_submap()
end)
hl.bind("Return", function()
hl.dispatch(hl.dsp.exec_cmd("kitty"))
exit_submap()
end)
hl.bind("k", launcher("kitty"))
hl.bind("Return", launcher("kitty"))
-- Filezilla
hl.bind("f", function()
hl.dispatch(hl.dsp.exec_cmd("filezilla"))
exit_submap()
end)
hl.bind("f", launcher("filezilla"))
-- Thunderbird
hl.bind("t", function()
hl.dispatch(hl.dsp.exec_cmd("thunderbird"))
exit_submap()
end)
hl.bind("t", launcher("thunderbird"))
-- Zathura
hl.bind("z", function()
hl.dispatch(hl.dsp.exec_cmd("zathura"))
exit_submap()
end)
hl.bind("z", launcher("zathura"))
-- Brave
hl.bind("Shift + B", function()
hl.dispatch(hl.dsp.exec_cmd("brave"))
exit_submap()
end)
hl.bind("Shift + B", launcher("brave"))
-- bsmanager
hl.bind("b", function()
hl.dispatch(hl.dsp.exec_cmd("/opt/bs-manager/bs-manager"))
exit_submap()
end)
hl.bind("b", launcher("/opt/bs-manager/bs-manager"))
-- ALVR
hl.bind("p", function()
hl.dispatch(hl.dsp.exec_cmd("alvr_dashboard"))
exit_submap()
end)
hl.bind("p", launcher("alvr_dashboard"))
-- Qalculate
hl.bind("c", function()
hl.dispatch(hl.dsp.exec_cmd("qalculate-qt"))
exit_submap()
end)
hl.bind("c", launcher("qalculate-qt"))
-- AirPlay
hl.bind("a", function()
@@ -0,0 +1,34 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.define_submap("notifications", function()
hl.bind("c", function()
hl.dispatch(hl.dsp.exec_cmd("swaync-client --hide-all"))
exit_submap()
end)
hl.bind("d", function()
hl.dispatch(hl.dsp.exec_cmd("swaync-client --clear-all"))
exit_submap()
end)
hl.bind("h", function()
hl.dispatch(hl.dsp.exec_cmd("swaync-client -cp"))
exit_submap()
end)
hl.bind("s", function()
hl.dispatch(hl.dsp.exec_cmd("swaync-client -op"))
exit_submap()
end)
hl.bind("t", function()
hl.dispatch(hl.dsp.exec_cmd("swaync-client -t"))
exit_submap()
end)
hl.bind("Escape", function()
exit_submap()
end)
end)
+39
View File
@@ -0,0 +1,39 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.define_submap("screenshot", function()
hl.bind("y", function()
hl.dispatch(hl.dsp.exec_cmd("grimblast --notify copy area"))
exit_submap()
end)
hl.bind("c", function()
hl.dispatch(hl.dsp.exec_cmd("grimblast --notify copysave area"))
exit_submap()
end)
hl.bind("s", function()
hl.dispatch(hl.dsp.exec_cmd("grimblast --notify save area"))
exit_submap()
end)
hl.bind("Shift + y", function()
hl.dispatch(hl.dsp.exec_cmd("grimblast --notify copy screen"))
exit_submap()
end)
hl.bind("Shift + c", function()
hl.dispatch(hl.dsp.exec_cmd("grimblast --notify copysave screen"))
exit_submap()
end)
hl.bind("Shift + s", function()
hl.dispatch(hl.dsp.exec_cmd("grimblast --notify save screen"))
exit_submap()
end)
hl.bind("Escape", function()
exit_submap()
end)
end)
+42
View File
@@ -0,0 +1,42 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.bind("Super + Q", hl.dsp.exit())
hl.define_submap("window", function()
hl.bind("x", function()
hl.dispatch(hl.dsp.exit())
exit_submap()
end)
hl.bind("q", function()
hl.dispatch(hl.dsp.exit())
exit_submap()
end)
hl.bind("f", function()
hl.dispatch(hl.dsp.window.fullscreen({ mode = "fullscreen" }))
exit_submap()
end)
hl.bind("v", function()
hl.dispatch(hl.dsp.window.float())
exit_submap()
end)
hl.bind("c", function()
hl.dispatch(hl.dsp.window.center())
exit_submap()
end)
hl.bind("Shift + K", function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Insta-Kill activated' --app-name='Hyprtclt'"))
hl.dispatch(hl.dsp.exec_cmd("hyprctl kill"))
exit_submap()
end)
hl.bind("Escape", function()
exit_submap()
end)
end)
+38
View File
@@ -0,0 +1,38 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
for i = 1, 10, 1 do
hl.bind("Super + " .. tostring(i % 10), hl.dsp.focus({ workspace = tostring(i) }))
hl.bind("Super + Shift + " .. tostring(i % 10), hl.dsp.window.move({ workspace = tostring(i), follow = 1 }))
end
hl.bind("Super + h", hl.dsp.focus({ direction = "l" }))
hl.bind("Super + l", hl.dsp.focus({ direction = "r" }))
hl.bind("Super + j", hl.dsp.focus({ direction = "d" }))
hl.bind("Super + k", hl.dsp.focus({ direction = "u" }))
hl.bind("Super + M", hl.dsp.workspace.toggle_special("main"))
hl.bind("Super + Shift + M", hl.dsp.window.move({ workspace = "special:main" }))
hl.define_submap("notifications", function()
for i = 1, 10, 1 do
hl.bind(tostring(i % 10), hl.dsp.focus({ workspace = tostring(i) }))
hl.bind("Shift + " .. tostring(i % 10), hl.dsp.window.move({ workspace = tostring(i), follow = 1 }))
end
hl.bind("h", hl.dsp.focus({ direction = "l" }))
hl.bind("l", hl.dsp.focus({ direction = "r" }))
hl.bind("j", hl.dsp.focus({ direction = "d" }))
hl.bind("k", hl.dsp.focus({ direction = "u" }))
hl.bind("Shift + l", hl.dsp.window.move({ workspace = "+1", follow = 1 }))
hl.bind("Shift + h", hl.dsp.window.move({ workspace = "-1", follow = 1 }))
hl.bind("M", hl.dsp.workspace.toggle_special("main"))
hl.bind("Shift + M", hl.dsp.window.move({ workspace = "special:main" }))
hl.bind("Escape", function()
exit_submap()
end)
end)