aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Keys.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-04-12 13:07:17 -0600
committerJosh Rahm <rahm@google.com>2022-04-12 13:07:17 -0600
commite5bee7f2f095bffdef1c31e27f4b036780b01654 (patch)
tree0a097be91bee15a334dbd830685a9485a8e26abf /src/Rahm/Desktop/Keys.hs
parentc0e224d7fabcf0d274419a5f3ae79bc4fea637f2 (diff)
downloadrde-e5bee7f2f095bffdef1c31e27f4b036780b01654.tar.gz
rde-e5bee7f2f095bffdef1c31e27f4b036780b01654.tar.bz2
rde-e5bee7f2f095bffdef1c31e27f4b036780b01654.zip
Add type-static way to get the length of a LayoutList
Diffstat (limited to 'src/Rahm/Desktop/Keys.hs')
-rw-r--r--src/Rahm/Desktop/Keys.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs
index 87f88cf..321d185 100644
--- a/src/Rahm/Desktop/Keys.hs
+++ b/src/Rahm/Desktop/Keys.hs
@@ -53,7 +53,8 @@ import Rahm.Desktop.PassMenu
import Rahm.Desktop.Logger
import Rahm.Desktop.RebindKeys
import Rahm.Desktop.Swallow
-import Rahm.Desktop.Layout.List (toNextLayout, toPreviousLayout, toFirstLayout)
+import Rahm.Desktop.Layout.List (
+ toNextLayout, toPreviousLayout, toFirstLayout, toIndexedLayout)
import Rahm.Desktop.Layout.Hole (toggleHole)
import Rahm.Desktop.Layout.Pop (togglePop)
import Rahm.Desktop.Layout.Flip (flipHorizontally, flipVertically)
@@ -438,10 +439,14 @@ keymap = runKeys $ do
(noMod -|- justMod) $ doc "Rotate the layout 90 degrees" $
sendMessage rotateLayout
- bind xK_t $
+ bind xK_c $
(noMod -|- justMod) $ doc "Toggle the pop window" $
sendMessage togglePop
+ bind xK_t $
+ (noMod -|- justMod) $ doc "Jump to the middle layout." $
+ sendMessage (toIndexedLayout (nLayouts `div` 2))
+
bind xK_x $
(noMod -|- justMod) $ doc "Toggle the hole" $
sendMessage toggleHole