diff options
Diffstat (limited to 'config/srd/keybindings.lua')
| -rw-r--r-- | config/srd/keybindings.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/config/srd/keybindings.lua b/config/srd/keybindings.lua index 5c05b84..aa3e425 100644 --- a/config/srd/keybindings.lua +++ b/config/srd/keybindings.lua @@ -32,6 +32,31 @@ srd.bind("Mod4+j", function() srd.window.focus("down") end) srd.bind("Mod4+k", function() srd.window.focus("up") end) srd.bind("Mod4+l", function() srd.window.focus("right") end) +- Move the focused window in a direction, mirroring the focus keys above. +- `srd.window.move` has existed for a long time and simply had no default +- binding, so "move window to absolute directions" was unreachable without +- writing your own config. +srd.bind("Mod4+Shift+h", function() srd.window.move("left") end) +srd.bind("Mod4+Shift+j", function() srd.window.move("down") end) +srd.bind("Mod4+Shift+k", function() srd.window.move("up") end) +srd.bind("Mod4+Shift+l", function() srd.window.move("right") end) + +- Layout switching. srdwm is dynamic-first: "dynamic" is free placement, +- the default, and tiling is one opt-in layout among several. Mod4+s +- toggles between the two, which is the pair worth a single key. +srd.bind("Mod4+s", function() + if srd.layout.get() == "tiling" then + srd.layout.set("dynamic") + else + srd.layout.set("tiling") + end +end) + +- Lock the session using srdwm's own built-in lock screen. `srd.lock()` +- talks to the compositor directly rather than shelling out to the control +- CLI, so it still works when that binary is not on PATH. +srd.bind("Mod4+Ctrl+l", function() srd.lock() end) + - Workspace management srd.bind("Mod4+Tab", function() srd.workspace.next() end) srd.bind("Mod4+Shift+Tab", function() srd.workspace.prev() end) |