aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Keys.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Rahm/Desktop/Keys.hs')
-rw-r--r--src/Rahm/Desktop/Keys.hs34
1 files changed, 23 insertions, 11 deletions
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs
index 8945201..9b72494 100644
--- a/src/Rahm/Desktop/Keys.hs
+++ b/src/Rahm/Desktop/Keys.hs
@@ -675,6 +675,25 @@ bindings = do
altMod $ spawnX "sudo -A systemctl suspend && xsecurelock"
+ bind xK_x $ do
+ shiftMod $
+ doc "Reset the holes" $ do
+ logs Debug "reset hole"
+ sendMessage resetHole
+ logs Debug "/reset hole"
+
+ justMod $
+ doc "Add hole next to the current window" $ do
+ logs Debug "Add hole"
+ withFocused $ \foc ->
+ withWindowSet $ \ws -> do
+ logs Debug "/Add hole at %s" (show foc)
+ whenJust (W.windowTilePosition foc ws) $ \tp -> do
+ logs Debug "Tile position: %s" (show tp)
+ (X.broadcastMessage . addHole) tp
+ refresh
+ logs Debug "/Add hole"
+
bind xK_space $ do
justMod $
doc "Layout-related bindings" $
@@ -719,12 +738,10 @@ bindings = do
doc "Jump to the middle layout." $
sendMessage (toIndexedLayout (nLayouts `div` 2))
- bind xK_x $
- (noMod -|- justMod) $
- doc "Toggle the hole" $ do
- logs Debug "reset hole"
- sendMessage resetHole
- logs Debug "/reset hole"
+ bind xK_x $ do
+ justMod $
+ doc "Toggles respect for struts." $
+ sendMessage ToggleStruts
bind xK_g
$ (noMod -|- justMod)
@@ -777,11 +794,6 @@ bindings = do
doc "Spawn a floating terminal" $
spawnX =<< asks ((++ " -t Floating\\ Term") . terminal . config)
- bind xK_x $ do
- justMod $
- doc "Toggles respect for struts." $
- sendMessage ToggleStruts
-
bind xK_z $ do
justMod $
doc "Less often used keybindings." $