aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Keys.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-11-20 14:49:26 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-11-20 14:49:26 -0700
commit333f10dcc0655cf5f107797f5a320acbfb1e0096 (patch)
tree558de7ab9d70cbfd0b1fd7eb34ad79adf24f18d0 /src/Rahm/Desktop/Keys.hs
parentfe6a40933468cb0c9227c11c705e8a53e980c07b (diff)
parent3c49e047d920c8662b61726460df3eb31df0b146 (diff)
downloadrde-333f10dcc0655cf5f107797f5a320acbfb1e0096.tar.gz
rde-333f10dcc0655cf5f107797f5a320acbfb1e0096.tar.bz2
rde-333f10dcc0655cf5f107797f5a320acbfb1e0096.zip
Merge remote-tracking branch 'origin/v017' into v017
Diffstat (limited to 'src/Rahm/Desktop/Keys.hs')
-rw-r--r--src/Rahm/Desktop/Keys.hs41
1 files changed, 29 insertions, 12 deletions
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs
index b57d310..ac80561 100644
--- a/src/Rahm/Desktop/Keys.hs
+++ b/src/Rahm/Desktop/Keys.hs
@@ -64,6 +64,8 @@ import Rahm.Desktop.Submap
import Rahm.Desktop.Swallow
import Rahm.Desktop.SwapMaster (swapMaster)
import Rahm.Desktop.Workspaces
+import Rahm.Desktop.Theater
+
import qualified Rahm.Desktop.StackSet as W
import Rahm.Desktop.History
@@ -281,10 +283,18 @@ keymap = runKeys $ do
runMaybeT_ $ (lift . gotoWorkspaceFn) =<< readNextWorkspace
shiftMod $
- doc "Swap a workspace with another workspace." $
- runMaybeT_ $
- lift . windows . uncurry W.swapWorkspaces =<<
- (,) <$> readNextWorkspaceName <*> readNextWorkspaceName
+ doc "Restore the theater marked with the next typed character." $
+ runMaybeT_ $ do
+ mapNextString $ \_ str -> lift $
+ case str of
+ [ch] | isAlpha ch -> restoreTheater [ch]
+ _ -> return ()
+
+ -- shiftMod $
+ -- doc "Swap a workspace with another workspace." $
+ -- runMaybeT_ $
+ -- lift . windows . uncurry W.swapWorkspaces =<<
+ -- (,) <$> readNextWorkspaceName <*> readNextWorkspaceName
controlMod $
doc "Move the current focused window to another workspace and view that workspace" $
@@ -400,18 +410,25 @@ keymap = runKeys $ do
doc "For mosaic layout, shrink the size-share of the current window" $
sendMessage =<< shrinkPositionAlt
- bind xK_m $
+ bind xK_m $ do
justMod $
doc "Mark the current window with the next typed character." $ do
locs <- fromMaybe [] <$> runMaybeT readNextLocationSet
let wins = mapMaybe locationWindow locs
- withBorderWidth 4 wins $
- withBorderColor "#00ffff" wins $ do
- runMaybeT_ $ do
- mapNextString $ \_ str -> lift $
- case str of
- [ch] | isAlpha ch -> markAllLocations str locs
- _ -> return ()
+ withBorderColor "#00ffff" wins $ do
+ runMaybeT_ $ do
+ mapNextString $ \_ str -> lift $
+ case str of
+ [ch] | isAlpha ch -> markAllLocations str locs
+ _ -> return ()
+
+ shiftMod $
+ doc "Mark the current theater with the next typed character." $
+ runMaybeT_ $ do
+ mapNextString $ \_ str -> lift $
+ case str of
+ [ch] | isAlpha ch -> saveCurrentTheater str
+ _ -> return ()
bind xK_plus $ do
justMod $