diff options
| author | Josh Rahm <rahm@google.com> | 2024-01-24 12:14:31 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2024-01-24 12:14:31 -0700 |
| commit | b9a74dbb95e7262a70ca4fe4e7305e15d8745d23 (patch) | |
| tree | 5983c981a91cb7911b3ce3fb9deb1eb59f5dd7ae /src/Rahm/Desktop/Keys.hs | |
| parent | 1e9b72d85ceb619f601f7c3b8f6b5c07ec88355f (diff) | |
| parent | 382d813c7d051fb2619cab1120dc72ee88a154be (diff) | |
| download | rde-b9a74dbb95e7262a70ca4fe4e7305e15d8745d23.tar.gz rde-b9a74dbb95e7262a70ca4fe4e7305e15d8745d23.tar.bz2 rde-b9a74dbb95e7262a70ca4fe4e7305e15d8745d23.zip | |
Merge branch 'main' of git.josher.dev:rde
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." $ |