From 11c72d913f5d3f0f4f9c65ffe1b680d6c2dfcf26 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 26 Jan 2024 15:10:29 -0700 Subject: Moving away from the a, o, e keybindings. Change f to 'focus' These keybindings are 1. Expensive, it's 3 different keys on a prime spot on the keyboard. 2. Position dependent to make sense. Not interoperable between QWERTY and Dvorak. 3. Not very powerful These keys are being replaced with a new 'f' keybinding. 'f' operates just like 'g' except it will non-greedily focus the workspace if it's already visible. (and 'f' only works with normal workspaces right now). --- src/Rahm/Desktop/Keys.hs | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'src/Rahm/Desktop') diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index fb62bee..b84a586 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -342,23 +342,6 @@ bindings = do bind xK_Return $ do justMod swapMaster - -- Switch between different screens. These are the leftmost keys on the home - -- row in a Dvorak layout. One might want to switch these to ASD for QWERTY. - forM_ (zip [xK_a, xK_o, xK_e] [0 ..]) $ \(key, idx) -> - bind key $ do - -- Move focus to that screen. - justMod $ - doc ("Switch focus to screen " ++ show idx) $ - withScreen W.view idx - -- Swap the current screen with the one given - altMod $ - doc ("Swap the current screen with screen " ++ show idx) $ - withScreen W.greedyView idx - -- Move the current window to the select screen. - shiftMod $ - doc ("Move the current window to screen " ++ show idx) $ - withScreen W.shift idx - bind xK_bracketright $ do justMod $ doc "Increase the gaps between windows." $ @@ -383,11 +366,12 @@ bindings = do bind xK_f $ do justMod $ - doc "Flip the current layout vertically" $ - sendMessage flipVertically - shiftMod $ - doc "Flip the current layout horizontally" $ - sendMessage flipHorizontally + doc "Focus (non-greedily) a workspace. Useful for focusing between \ + \screens with ',.', '$', '^', etc." $ + pushPendingBuffer "f " $ do + runMaybeT_ $ do + ws <- readNextWorkspaceName + lift $ windows $ W.view ws bind xK_g $ do justMod $ -- cgit