Add workspace rules

This commit is contained in:
2026-05-25 16:51:51 -04:00
parent f115c971c8
commit 00139c7023
3 changed files with 24 additions and 8 deletions
+8 -7
View File
@@ -210,7 +210,6 @@ hl.config({
},
})
---------------
---- INPUT ----
---------------
@@ -261,10 +260,10 @@ local closeWindowBind = hl.bind(mainMod .. " + C", hl.dsp.window.close())
closeWindowBind:set_enabled(false)
-- hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'"))
-- hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu))
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit")) -- dwindle only
-- hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
-- hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu))
-- hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
-- hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit")) -- dwindle only
-- Move focus with mainMod + arrow keys
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" }))
@@ -289,8 +288,8 @@ hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
-- Move/resize windows with mainMod + LMB/RMB and dragging
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 .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
-- hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
-- Laptop multimedia keys for volume and LCD brightness
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
@@ -311,6 +310,8 @@ hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = tr
---- WINDOWS AND WORKSPACES ----
--------------------------------
require("workspaces")
-- See https://wiki.hypr.land/Configuring/Basics/Window-Rules/
-- and https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/
+5 -1
View File
@@ -43,7 +43,7 @@ hl.bind("XF86Calculator", hl.dsp.exec_cmd(calculator))
hl.bind(mainMod .. " + G", hl.dsp.submap("group"))
hl.define_submap("group", function()
hl.bind("G", function()
hl.bind(mainMod .. " + G", function()
hl.dsp.group.toggle()
hl.dsp.submap("reset")
end)
@@ -73,3 +73,7 @@ hl.define_submap("group", function()
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)
+11
View File
@@ -0,0 +1,11 @@
hl.workspace_rule({ workspace = "1", monitor = "eDP-1", layout = "scrolling"})
hl.workspace_rule({ workspace = "3", monitor = "eDP-1", layout = "scrolling"})
hl.workspace_rule({ workspace = "5", monitor = "eDP-1", layout = "scrolling"})
hl.workspace_rule({ workspace = "7", monitor = "eDP-1", layout = "scrolling"})
hl.workspace_rule({ workspace = "9", monitor = "eDP-1", layout = "scrolling"})
hl.workspace_rule({ workspace = 2, monitor = "HDMI-A-3" })
hl.workspace_rule({ workspace = 4, monitor = "HDMI-A-3" })
hl.workspace_rule({ workspace = 6, monitor = "HDMI-A-3" })
hl.workspace_rule({ workspace = 8, monitor = "HDMI-A-3" })
hl.workspace_rule({ workspace = 0, monitor = "HDMI-A-3" })