diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2023-12-18 05:30:47 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2023-12-18 05:30:47 -0700 |
| commit | 8e168883155a61d98bdeb6782515231f962a02b5 (patch) | |
| tree | 43c2f507e70e9dbcde18561fb4215da825908499 /src/Rahm/Desktop/Keys.hs | |
| parent | 836991558eefc53e7ff1f1db6a8faaf59aee9bb8 (diff) | |
| download | rde-8e168883155a61d98bdeb6782515231f962a02b5.tar.gz rde-8e168883155a61d98bdeb6782515231f962a02b5.tar.bz2 rde-8e168883155a61d98bdeb6782515231f962a02b5.zip | |
Add ability to add a hole to the layout. Doesn't work perfectly.
Diffstat (limited to 'src/Rahm/Desktop/Keys.hs')
| -rw-r--r-- | src/Rahm/Desktop/Keys.hs | 34 |
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." $ |