diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2021-11-29 13:11:54 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:45 -0600 |
| commit | 8486ce27943b1c0460bfcd6d93ed84d2b3c5afb5 (patch) | |
| tree | 52f5343a37e06d5b4d1914a7a5d00807e3f16497 /src | |
| parent | bc8f075ebc6ebb987a6c6a20e8a30df241197073 (diff) | |
| download | rde-8486ce27943b1c0460bfcd6d93ed84d2b3c5afb5.tar.gz rde-8486ce27943b1c0460bfcd6d93ed84d2b3c5afb5.tar.bz2 rde-8486ce27943b1c0460bfcd6d93ed84d2b3c5afb5.zip | |
Add some changes.
1. Make the spotify control work for both Spotify and Spotifyd
2. Xmobar weather not break xmobar when not connected to the internet
3. Add g<space> keybinding to go to the toogle-cased version of the
current workspace.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Internal/Keys.hs | 1 | ||||
| -rw-r--r-- | src/Internal/Lib.hs | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 89e2cf1..2905ba0 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -141,6 +141,7 @@ keymap = runKeys $ do justMod $ mapNextString $ \_ str -> case str of [ch] | isAlphaNum ch -> gotoWorkspace ch + [' '] -> gotoAccompaningWorkspace _ -> return () shiftMod $ mapNextString $ \_ str -> case str of diff --git a/src/Internal/Lib.hs b/src/Internal/Lib.hs index c3bdeb9..3beb640 100644 --- a/src/Internal/Lib.hs +++ b/src/Internal/Lib.hs @@ -64,6 +64,17 @@ getHorizontallyOrderedScreens windowSet = where screens = current windowSet : visible windowSet +getCurrentWorkspace :: X WorkspaceName +getCurrentWorkspace = withWindowSet $ + \(StackSet (Screen (Workspace t _ _) _ _) _ _ _) -> do + return (head t) + +gotoAccompaningWorkspace :: X () +gotoAccompaningWorkspace = do + cur <- getCurrentWorkspace + if isUpper cur + then gotoWorkspace (toLower cur) + else gotoWorkspace (toUpper cur) gotoWorkspace :: WorkspaceName -> X () gotoWorkspace ch = do |