diff options
| author | Josh Rahm <rahm@google.com> | 2023-12-04 11:47:40 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2023-12-04 11:47:40 -0700 |
| commit | 7451146b8738db5bd31c968e9fc6703fcbff6078 (patch) | |
| tree | 8e60bb3f70e309d6b568840104ee1dd0302d7982 /src/Rahm/Desktop/Keys | |
| parent | a50f8bcfff34ba6eaa66b17107ca0b6c4d99a224 (diff) | |
| download | rde-7451146b8738db5bd31c968e9fc6703fcbff6078.tar.gz rde-7451146b8738db5bd31c968e9fc6703fcbff6078.tar.bz2 rde-7451146b8738db5bd31c968e9fc6703fcbff6078.zip | |
Change the rotate-screen-left/right to just swap current screen with left/right. It is more intuitive and is more flexible. As a part of this, I incresed the timeout for multiple button bindings to 5000ms like how keystrokes work.
Diffstat (limited to 'src/Rahm/Desktop/Keys')
| -rw-r--r-- | src/Rahm/Desktop/Keys/Wml.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Rahm/Desktop/Keys/Wml.hs b/src/Rahm/Desktop/Keys/Wml.hs index d1e381c..7a59cbd 100644 --- a/src/Rahm/Desktop/Keys/Wml.hs +++ b/src/Rahm/Desktop/Keys/Wml.hs @@ -31,6 +31,8 @@ module Rahm.Desktop.Keys.Wml feedKeysT, workspaceForKeysT, workspaceForKeys, + workspaceForStringT, + workspaceForString, locationSetForKeysT, locationSetForKeys, readNextWorkspaceName, @@ -366,6 +368,15 @@ workspaceForKeysT str = feedKeysT str readNextWorkspace workspaceForKeys :: KeyString -> X (Maybe Workspace) workspaceForKeys = runMaybeT . workspaceForKeysT +-- Returns a workspace for the given string. Note that workspaces which are +-- defined by special masks and symbols will not work. I.e. macros will not +-- work. +workspaceForStringT :: String -> MaybeT X Workspace +workspaceForStringT = workspaceForKeysT . map (\c -> (def, def, [c])) + +workspaceForString :: String -> X (Maybe Workspace) +workspaceForString = runMaybeT . workspaceForStringT + -- Like the above, but unwrap the MaybeT locationSetForKeysT :: KeyString -> MaybeT X [Location] locationSetForKeysT s = feedKeysT s readNextLocationSet |