diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-04-13 00:22:08 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | cecacbf482f90d0ed56ce320fbb557b22cd3d7b0 (patch) | |
| tree | 85fb4a94d2d3f8ea7b0802fc72fc7b7e78230879 /src/Rahm/Desktop/Keys.hs | |
| parent | 85310f18ac936032ea8eb4e3e177684d2d738b7c (diff) | |
| download | rde-cecacbf482f90d0ed56ce320fbb557b22cd3d7b0.tar.gz rde-cecacbf482f90d0ed56ce320fbb557b22cd3d7b0.tar.bz2 rde-cecacbf482f90d0ed56ce320fbb557b22cd3d7b0.zip | |
Add ConsistentMosaic, a wrapper to make Mosaic more consistent.
Right now, Mosaic operate on the windows itself. But this means that
swapping windows can act very unintuitively. This wrapper changes
mosaci to work on window /positions/ rather than windows themselves,
so the window in position 1 will always be the same size, and when moved
to position 2, it will inherit that position's size.
There's still some buggy behavior, but it is in general much more
intuitive than it was before.
Diffstat (limited to 'src/Rahm/Desktop/Keys.hs')
| -rw-r--r-- | src/Rahm/Desktop/Keys.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index 622fd3a..f7aae3c 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -60,6 +60,7 @@ import Rahm.Desktop.Layout.Pop (togglePop) import Rahm.Desktop.Layout.Flip (flipHorizontally, flipVertically) import Rahm.Desktop.Layout.Rotate (rotateLayout) import Rahm.Desktop.ScreenRotate (screenRotateForward, screenRotateBackward) +import Rahm.Desktop.Layout.ConsistentMosaic type KeyMap l = XConfig l -> Map (KeyMask, KeySym) (X ()) type ButtonsMap l = XConfig l -> Map (KeyMask, Button) (Window -> X ()) @@ -362,7 +363,7 @@ keymap = runKeys $ do shiftMod $ doc "For mosaic layout, shrink the size-share of the current window" $ - withFocused $ sendMessage . shrinkWindowAlt + sendMessage =<< shrinkPositionAlt bind xK_m $ do justMod $ @@ -389,7 +390,7 @@ keymap = runKeys $ do shiftMod $ doc "For mosaic layout, increase the size-share of the current window." $ - withFocused $ sendMessage . expandWindowAlt + sendMessage =<< expandPositionAlt bind xK_q $ do shiftMod $ |