From abefac7bd156275eb4ea7ff1392234a284c9790e Mon Sep 17 00:00:00 2001 From: venus Date: Sat, 3 Oct 2026 00:02:54 -0500 Subject: [PATCH] feat: finally added commands for better grouping. TODO fix the looks for the group bar --- basic/keybinds.lua | 12 +++++++++--- basic/submaps.lua | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/basic/keybinds.lua b/basic/keybinds.lua index 9b1e112..41ad7af 100644 --- a/basic/keybinds.lua +++ b/basic/keybinds.lua @@ -67,8 +67,8 @@ hl.bind(mainMod .. " + CTRL + right" ,hl.dsp.focus ({ workspace = "m+1"})) hl.bind(mainMod .. " + CTRL + left" ,hl.dsp.focus ({ workspace = "m-1"})) hl.bind(mainMod .. " + CTRL + l" ,hl.dsp.focus ({ workspace = "m+1"})) hl.bind(mainMod .. " + CTRL + h" ,hl.dsp.focus ({ workspace = "m-1"})) -hl.bind(mainMod .. " + TAB " ,hl.dsp.focus ({ monitor = "-1"})) -hl.bind(mainMod .. " + SHIFT + TAB " ,hl.dsp.focus ({ monitor = "+1"})) +-- hl.bind(mainMod .. " + TAB " ,hl.dsp.focus ({ monitor = "-1"})) +-- hl.bind(mainMod .. " + SHIFT + TAB " ,hl.dsp.focus ({ monitor = "+1"})) -- 2.3 Switch workspaces with mainMod + [0-9] hl.bind(mainMod .. " + 1 " ,hl.dsp.focus({workspace = 1 })) hl.bind(mainMod .. " + 2 " ,hl.dsp.focus({workspace = 2 })) @@ -84,7 +84,6 @@ hl.bind(mainMod .. " + 0 " ,hl.dsp.focus({workspace = 10})) ---- 3 SPECIAL WORKSPACES ---- -- 3.2 Switch to special workspaces with mainMod + [S, B, G, N, U, R] hl.bind(mainMod .. " + S " ,hl.dsp.workspace.toggle_special("magic")) -hl.bind(mainMod .. " + B " ,hl.dsp.workspace.toggle_special("book")) hl.bind(mainMod .. " + X " ,hl.dsp.workspace.toggle_special("phantom")) hl.bind(mainMod .. " + SHIFT + A" ,hl.dsp.workspace.toggle_special("gaming")) hl.bind(mainMod .. " + A " ,hl.dsp.workspace.toggle_special("notes")) @@ -163,6 +162,10 @@ hl.bind("SHIFT + PRINT" ,hl.dsp.exec_cmd(stk .. "annotate")) hl.bind("ALT + PRINT" ,hl.dsp.exec_cmd(stk .. "annotateWindow")) hl.bind("CTRL + PRINT" ,hl.dsp.exec_cmd(stk .. "annotateFullscreen")) +-- Screen Grouping modifiers +hl.bind(mainMod .. " + TAB" ,hl.dsp.group.next()) +hl.bind(mainMod .. " + SHIFT + TAB" ,hl.dsp.group.prev()) + ---- 14. SUBMAP DISPATCHERS ---- @@ -170,3 +173,6 @@ hl.bind(mainMod .. "+ PRINT" ,function() hl.dispatch(hl.dsp.exec_cmd(stk .. "t hl.bind(mainMod .. " + O " ,hl.dsp.submap("open-apps")) hl.bind(mainMod .. " + M " ,function() hl.dispatch(hl.dsp.exec_cmd(ipc .. "panel-toggle control-center")) hl.dispatch(hl.dsp.submap("quick-settings")) end) hl.bind(mainMod .. " + T" ,function() hl.dispatch(hl.dsp.submap("timer")) hl.exec_cmd(ipc .. "panel-toggle noctalia/timer:panel") end) +hl.bind(mainMod .. " + Z" ,function() hl.dispatch(hl.dsp.submap("group")) end) +hl.bind(mainMod .. " + B" ,function() hl.dispatch(hl.dsp.submap("group")) end) +hl.bind(mainMod .. " + apostrophe" ,function() hl.dispatch(hl.dsp.submap("group")) end) diff --git a/basic/submaps.lua b/basic/submaps.lua index 66adcf9..fa957b9 100644 --- a/basic/submaps.lua +++ b/basic/submaps.lua @@ -145,4 +145,19 @@ hl.define_submap("open-apps", "reset", function() -- Submap for quickly opening hl.bind("catchall" ,hl.dsp.submap("reset")) end) +hl.define_submap("group", "reset", function() -- Submap for managing groups + hl.bind("G" ,hl.dsp.group.toggle()) + hl.bind("apostrophe" ,hl.dsp.group.toggle()) + hl.bind("SUPER + apostrophe" ,hl.dsp.group.toggle()) + hl.bind("N" ,hl.dsp.group.next()) + hl.bind("P" ,hl.dsp.group.prev()) + hl.bind("H" ,hl.dsp.window.move({ into_or_create_group = "left" })) + hl.bind("L" ,hl.dsp.window.move({ into_or_create_group = "right" })) + hl.bind("K" ,hl.dsp.window.move({ into_or_create_group = "up" })) + hl.bind("J" ,hl.dsp.window.move({ into_or_create_group = "down" })) + hl.bind("SHIFT + N" ,hl.dsp.group.move_window({ forward = false})) + hl.bind("SHIFT + P" ,hl.dsp.group.move_window({ forward = true})) + hl.bind("SHIFT + L" ,hl.dsp.group.lock_active({ action = "toggle" })) + hl.bind("catchall" ,hl.dsp.submap("reset")) +end) -- TODO Implement a VPN summap that allows quick connection to different VPN servers and toggling the VPN on/off.