From b5d09f06709cd5c93cb3d31629655fb87d68ee67 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 22 Nov 2021 10:58:03 -0700 Subject: Add keybindings to - Copy window to another Workspace. - Launch a floating terminal. --- src/Internal/Keys.hs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/Internal/Keys.hs') diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 3b61dac..c3c8db5 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -1,5 +1,5 @@ {-# LANGUAGE RankNTypes #-} -module Internal.Keys where +module Internal.Keys (applyKeys) where import Internal.SwapMaster (swapMaster) import XMonad.Hooks.ManageDocks @@ -30,6 +30,10 @@ import XMonad.Prompt.Input import XMonad.Prompt.Shell import XMonad.Util.CustomKeys import XMonad.Util.Scratchpad +import XMonad.Actions.RotSlaves +import XMonad.Actions.CopyWindow as CopyWindow +import XMonad.Actions.SpawnOn as SpawnOn + import qualified Data.Map as Map import qualified XMonad.StackSet as W @@ -82,6 +86,8 @@ newKeys = , ((modm, xK_c), runPassMenu) , ((modm, xK_h), windows W.focusDown) , ((modm, xK_l), windows W.focusUp) + , ((modm .|. controlMask, xK_h), rotAllDown) + , ((modm .|. controlMask, xK_l), rotAllUp) , ((modm .|. shiftMask, xK_h), windows W.swapUp) , ((modm .|. shiftMask, xK_l), windows W.swapDown) , ((modm , xK_f), sendMessage FlipLayout) @@ -99,6 +105,7 @@ newKeys = , ((mod4Mask, xK_BackSpace), (void $ spawn "xterm")) , ((modm, xK_BackSpace), (void $ spawn "pkill -SIGUSR1 xmobar")) , ((modm, xK_t), (void $ spawn (terminal config))) + , ((modm .|. mod1Mask, xK_t), (void $ spawn (terminal config ++ " -t Floating\\ Term"))) , ((modm, xK_m), (submap $ mapAlpha modm markCurrentWindow)) , ((modm, xK_w), windowJump) , ((modm, xK_space), sendMessage NextLayout) @@ -121,6 +128,9 @@ newKeys = , ((modm .|. shiftMask, xK_g), (submap $ mapNumbersAndAlpha 0 shiftToWorkspace)) + , ((modm .|. shiftMask, xK_g), (submap $ + mapNumbersAndAlpha shiftMask (\i -> windows $ CopyWindow.copy [i]))) + , ((modm .|. shiftMask .|. mod1Mask, xK_g), (submap $ mapNumbersAndAlpha 0 swapWorkspace)) @@ -165,9 +175,7 @@ newKeys = ] mapNumbersAndAlpha :: KeyMask -> (Char -> X ()) -> Map (KeyMask, KeySym) (X ()) -mapNumbersAndAlpha km fn = - mapNumbers km fn - <> mapAlpha km fn +mapNumbersAndAlpha km fn = mapNumbers km fn <> mapAlpha km fn mapNumbers :: KeyMask -> (Char -> X ()) -> Map (KeyMask, KeySym) (X ()) mapNumbers km fn = -- cgit From 4661b9e7c78e556adc3cf998b65808a4d7886746 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 22 Nov 2021 12:22:54 -0700 Subject: Fix bug where moving window to workspace stopped working. --- src/Internal/Keys.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Internal/Keys.hs') diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index c3c8db5..d50b371 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -126,9 +126,7 @@ newKeys = mapNumbersAndAlpha 0 gotoWorkspace)) , ((modm .|. shiftMask, xK_g), (submap $ - mapNumbersAndAlpha 0 shiftToWorkspace)) - - , ((modm .|. shiftMask, xK_g), (submap $ + mapNumbersAndAlpha 0 shiftToWorkspace <> mapNumbersAndAlpha shiftMask (\i -> windows $ CopyWindow.copy [i]))) , ((modm .|. shiftMask .|. mod1Mask, xK_g), (submap $ -- cgit From 6b91a961e2951f40359af1fe2f1702970edac879 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 22 Nov 2021 16:03:16 -0700 Subject: Compeletely change how KeyBindings are done. Created new KeysM and ButtonsM monads to make configuring keybindings and button bindings more readable through a DSL. Before bindings would just be a giant list, but that made it difficult to read and repetitive. Now the syntax follows the pattern bind key-to-bind mask1 : action mask2 : action i.e. bind xK_a $ do justMod $ doSomeAction a b c shiftMod $ doSomeOtherAction a b c This makes it a lot cleaner to see all the bindings allocated to a specific key. That way, when adding a new binding, I can easily see what bindings already exist for that key. --- src/Internal/Keys.hs | 337 +++++++++++++++++++++++++++------------------------ 1 file changed, 176 insertions(+), 161 deletions(-) (limited to 'src/Internal/Keys.hs') diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index d50b371..ae2b9bd 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -1,6 +1,7 @@ {-# LANGUAGE RankNTypes #-} module Internal.Keys (applyKeys) where +import Internal.KeysM import Internal.SwapMaster (swapMaster) import XMonad.Hooks.ManageDocks import XMonad.Layout.MosaicAlt @@ -42,12 +43,183 @@ import Internal.DMenu import Internal.PassMenu type KeyMap l = XConfig l -> Map (KeyMask, KeySym) (X ()) +type ButtonsMap l = XConfig l -> Map (KeyMask, Button) (Window -> X ()) + +keymap :: KeyMap l +keymap = runKeys $ do + config <- getConfig + + let subkeys = submap . flip runKeys config + + bind xK_apostrophe $ do + justMod $ subkeys $ do + bind xK_apostrophe $ + justMod jumpToLast + mapAlpha 0 jumpToMark + + shiftMod $ subkeys $ do + bind xK_apostrophe $ + shiftMod swapWithLastMark + mapAlpha shiftMask swapWithMark + + bind xK_BackSpace $ do + -- The only raw keybinding. Meant to get a terminal to unbrick XMonad if + -- something goes wrong with the keyboard layout and for first-time boots + -- where dmenu/alacritty may not be installed. + rawMask mod4Mask $ spawn "xterm" + justMod $ spawn "pkill -SIGUSR 1 xmobar" + + bind xK_F1 $ + -- Button programmed on mouse + shiftMod $ click >> withFocused (windows . W.sink) + + bind xK_F2 $ + -- Button programmed on mouse + shiftMod $ click >> sendMessage ToggleZoom + + bind xK_F3 $ + -- Button programmed on mouse + shiftMod $ click >> kill + + bind xK_F10 $ do + justMod $ spawn "spotify-control play" + + bind xK_F11 $ do + justMod $ spawn "spotify-control prev" + + bind xK_F12 $ do + justMod $ spawn "spotify-control next" + + bind xK_Return $ do + justMod swapMaster + + bind xK_Tab $ do + justMod $ windows W.focusDown + shiftMod $ windows W.focusUp + + -- 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 $ withScreen W.view idx + -- Swap the current screen with the one given + altMod $ withScreen W.greedyView idx + -- Move the current window to the select screen. + shiftMod $ withScreen W.shift idx + + bind xK_bracketright $ do + justMod $ sendMessage $ modifyWindowBorder (-1) + + bind xK_bracketleft $ do + justMod $ sendMessage $ modifyWindowBorder 1 + + bind xK_b $ do + justMod $ spawn "bluetooth-select.sh" + + bind xK_c $ do + justMod runPassMenu + shiftMod kill + + bind xK_f $ do + justMod $ sendMessage FlipLayout + shiftMod $ sendMessage HFlipLayout + + bind xK_g $ do + justMod $ subkeys $ do + mapNumbersAndAlpha 0 gotoWorkspace + shiftMod $ subkeys $ do + mapNumbersAndAlpha 0 shiftToWorkspace + mapNumbersAndAlpha shiftMask (\i -> windows (CopyWindow.copy [i])) + shiftAltMod $ subkeys $ do + mapNumbersAndAlpha 0 swapWorkspace + + bind xK_h $ do + justMod $ windows W.focusDown + shiftMod $ windows W.swapDown + controlMod $ rotAllDown + + bind xK_j $ do + justMod $ sendMessage ShrinkZoom + + bind xK_k $ do + justMod $ sendMessage ExpandZoom + + bind xK_l $ do + justMod $ windows W.focusUp + shiftMod $ windows W.swapUp + controlMod $ rotAllUp + altMod $ spawn "xsecurelock" + + bind xK_minus $ do + justMod $ sendMessage (IncMasterN (-1)) + shiftMod $ withFocused $ sendMessage . expandWindowAlt + + bind xK_m $ do + justMod $ subkeys $ + mapAlpha 0 markCurrentWindow + + bind xK_n $ do + justMod $ relativeWorkspaceShift next + + bind xK_plus $ do + justMod $ sendMessage (IncMasterN 1) + shiftMod $ withFocused $ sendMessage . expandWindowAlt + + bind xK_q $ do + shiftMod $ spawn "xmonad --recompile && xmonad --restart" + + bind xK_r $ do + justMod runDMenu + shiftMod $ sendMessage DoRotate + + bind xK_s $ do + altMod $ spawn "sudo -A systemctl suspend && xsecurelock" + + bind xK_space $ do + justMod $ sendMessage NextLayout + shiftMod $ sendMessage NextLayout + + bind xK_t $ do + justMod $ spawn (terminal config) + shiftMod $ withFocused $ windows . W.sink + altMod $ spawn (terminal config ++ " -t Floating\\ Term") + + bind xK_w $ do + justMod windowJump + + bind xK_x $ do + justMod $ sendMessage ToggleStruts + + bind xK_z $ do + justMod $ sendMessage ToggleZoom + +mouseMap :: ButtonsMap l +mouseMap = runButtons $ do + bind button1 $ do + justMod $ \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster + + bind button2 $ do + justMod $ windows . (W.shiftMaster .) . W.focusWindow + + bind button3 $ do + justMod $ \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster + + bind (6 :: Button) $ + justMod $ const (relativeWorkspaceShift prev) + + bind (7 :: Button) $ + justMod $ const (relativeWorkspaceShift next) + + bind (8 :: Button) $ + justMod $ const (relativeWorkspaceShift prev) + + bind (9 :: Button) $ + justMod $ const (relativeWorkspaceShift next) applyKeys :: XConfig l -> IO (XConfig l) -applyKeys config@(XConfig {modMask = modm}) = do - ks <- newKeys - ms <- newMouse - return $ config { keys = ks, mouseBindings = ms } +applyKeys config@(XConfig {modMask = modm}) = + return $ config { keys = keymap, mouseBindings = mouseMap } newMouse :: IO (XConfig l -> Map (KeyMask, Button) (Window -> X ())) newMouse = @@ -73,160 +245,3 @@ click = do modifyWindowBorder :: Integer -> SpacingModifier modifyWindowBorder i = ModifyWindowBorder $ \(Border a b c d) -> (Border (a + i) (b + i) (c + i) (d + i)) - -newKeys :: IO (KeyMap l) -newKeys = - return $ \config@(XConfig {modMask = modm}) -> - Map.fromList - [ ((modm, xK_F12), (void $ spawn "spotify-control next")) - , ((modm, xK_F11), (void $ spawn "spotify-control prev")) - , ((modm, xK_semicolon), scratchpadSpawnActionTerminal "scratchpad") - , ((modm, xK_F10), (void $ spawn "spotify-control play")) - , ((modm, xK_r), runDMenu) - , ((modm, xK_c), runPassMenu) - , ((modm, xK_h), windows W.focusDown) - , ((modm, xK_l), windows W.focusUp) - , ((modm .|. controlMask, xK_h), rotAllDown) - , ((modm .|. controlMask, xK_l), rotAllUp) - , ((modm .|. shiftMask, xK_h), windows W.swapUp) - , ((modm .|. shiftMask, xK_l), windows W.swapDown) - , ((modm , xK_f), sendMessage FlipLayout) - , ((modm .|. shiftMask, xK_f), sendMessage HFlipLayout) - , ((modm , xK_Return), swapMaster) - , ((modm, xK_j), sendMessage Shrink) - , ((modm, xK_k), sendMessage Expand) - , ((modm .|. shiftMask, xK_r), sendMessage DoRotate) - , ((modm .|. mod1Mask, xK_l), (void $ spawn "xsecurelock")) - , ((modm .|. mod1Mask, xK_s), (void $ spawn "sudo systemctl suspend && xsecurelock")) - , ((modm .|. shiftMask, xK_c), kill) - , ((modm .|. shiftMask, xK_t), withFocused $ windows . W.sink) - , ((modm .|. shiftMask, xK_plus), withFocused $ sendMessage . expandWindowAlt) - , ((modm .|. shiftMask, xK_minus), withFocused $ sendMessage . shrinkWindowAlt) - , ((mod4Mask, xK_BackSpace), (void $ spawn "xterm")) - , ((modm, xK_BackSpace), (void $ spawn "pkill -SIGUSR1 xmobar")) - , ((modm, xK_t), (void $ spawn (terminal config))) - , ((modm .|. mod1Mask, xK_t), (void $ spawn (terminal config ++ " -t Floating\\ Term"))) - , ((modm, xK_m), (submap $ mapAlpha modm markCurrentWindow)) - , ((modm, xK_w), windowJump) - , ((modm, xK_space), sendMessage NextLayout) - , ((modm .|. shiftMask, xK_space), sendMessage FirstLayout) - , ((modm, xK_apostrophe), (submap $ - Map.insert - (modm, xK_apostrophe) - jumpToLast - (mapAlpha modm jumpToMark))) - - , ((modm .|. shiftMask, xK_apostrophe), (submap $ - Map.insert - (modm .|. shiftMask, xK_apostrophe) - swapWithLastMark - (mapAlpha (modm .|. shiftMask) swapWithMark))) - - , ((modm, xK_g), (submap $ - mapNumbersAndAlpha 0 gotoWorkspace)) - - , ((modm .|. shiftMask, xK_g), (submap $ - mapNumbersAndAlpha 0 shiftToWorkspace <> - mapNumbersAndAlpha shiftMask (\i -> windows $ CopyWindow.copy [i]))) - - , ((modm .|. shiftMask .|. mod1Mask, xK_g), (submap $ - mapNumbersAndAlpha 0 swapWorkspace)) - - , ((modm, xK_minus), sendMessage (IncMasterN (-1))) - , ((modm, xK_plus), sendMessage (IncMasterN 1)) - , ((modm .|. shiftMask, xK_bracketleft), sendMessage (modifyWindowBorder (-5))) - , ((modm .|. shiftMask, xK_bracketright), sendMessage (modifyWindowBorder 5)) - , ((modm, xK_bracketleft), sendMessage ShrinkZoom) - , ((modm, xK_bracketright), sendMessage ExpandZoom) - - , ((modm, xK_space), sendMessage NextLayout) - - , ((modm, xK_n), relativeWorkspaceShift next) - , ((modm, xK_p), relativeWorkspaceShift prev) - - , ((modm .|. shiftMask, xK_q), spawn "xmonad --recompile && xmonad --restart") - , ((modm, xK_z), sendMessage ToggleZoom) - - , ((modm, xK_x), spawn "bluetooth-select.sh") - , ((modm .|. shiftMask, xK_x), spawn "bluetoothctl -- disconnect") - - , ((modm, xK_Tab), windows W.focusDown) - , ((modm .|. shiftMask, xK_Tab), windows W.focusUp) - - , ((modm, xK_a), withScreen W.view 0) - , ((modm, xK_o), withScreen W.view 1) - , ((modm, xK_e), withScreen W.view 2) - - , ((modm .|. shiftMask, xK_a), withScreen W.shift 0) - , ((modm .|. shiftMask, xK_o), withScreen W.shift 1) - , ((modm .|. shiftMask, xK_e), withScreen W.shift 2) - - , ((modm .|. mod1Mask, xK_a), withScreen W.greedyView 0) - , ((modm .|. mod1Mask, xK_o), withScreen W.greedyView 1) - , ((modm .|. mod1Mask, xK_e), withScreen W.greedyView 2) - , ((modm, xK_b), sendMessage ToggleStruts) - - -- Buttons programmed on my mouse. - , ((shiftMask, xK_F1), click >> (withFocused $ windows . W.sink)) - , ((shiftMask, xK_F2), click >> sendMessage ToggleZoom) - , ((shiftMask, xK_F3), click >> kill) - ] - -mapNumbersAndAlpha :: KeyMask -> (Char -> X ()) -> Map (KeyMask, KeySym) (X ()) -mapNumbersAndAlpha km fn = mapNumbers km fn <> mapAlpha km fn - -mapNumbers :: KeyMask -> (Char -> X ()) -> Map (KeyMask, KeySym) (X ()) -mapNumbers km fn = - Map.fromList [ - ((km, xK_0), fn '0') - , ((km, xK_1), fn '1') - , ((km, xK_2), fn '2') - , ((km, xK_3), fn '3') - , ((km, xK_4), fn '4') - , ((km, xK_5), fn '5') - , ((km, xK_6), fn '6') - , ((km, xK_7), fn '7') - , ((km, xK_8), fn '8') - , ((km, xK_9), fn '9') - , ((km, xK_bracketright), fn '6') - , ((km, xK_exclam), fn '8') - , ((km, xK_bracketleft), fn '7') - , ((km, xK_braceleft), fn '5') - , ((km, xK_braceright), fn '3') - , ((km, xK_parenleft), fn '1') - , ((km, xK_equal), fn '9') - , ((km, xK_asterisk), fn '0') - , ((km, xK_parenright), fn '2') - , ((km, xK_plus), fn '4') - ] - -mapAlpha :: KeyMask -> (Char -> X ()) -> Map (KeyMask, KeySym) (X ()) -mapAlpha km fn = - Map.fromList [ - ((km, xK_a), fn 'a') - , ((km, xK_b), fn 'b') - , ((km, xK_c), fn 'c') - , ((km, xK_d), fn 'd') - , ((km, xK_e), fn 'e') - , ((km, xK_f), fn 'f') - , ((km, xK_g), fn 'g') - , ((km, xK_h), fn 'h') - , ((km, xK_i), fn 'i') - , ((km, xK_j), fn 'j') - , ((km, xK_k), fn 'k') - , ((km, xK_l), fn 'l') - , ((km, xK_m), fn 'm') - , ((km, xK_n), fn 'n') - , ((km, xK_o), fn 'o') - , ((km, xK_p), fn 'p') - , ((km, xK_q), fn 'q') - , ((km, xK_r), fn 'r') - , ((km, xK_s), fn 's') - , ((km, xK_t), fn 't') - , ((km, xK_u), fn 'u') - , ((km, xK_v), fn 'v') - , ((km, xK_w), fn 'w') - , ((km, xK_x), fn 'x') - , ((km, xK_y), fn 'y') - , ((km, xK_z), fn 'z') - ] -- cgit From 245e135bf003ca9420f21dc82727a9b9b4f0bdcf Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 22 Nov 2021 16:11:23 -0700 Subject: Delete newMouse. It's not used. --- src/Internal/Keys.hs | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/Internal/Keys.hs') diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index ae2b9bd..88b90dc 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -221,21 +221,6 @@ applyKeys :: XConfig l -> IO (XConfig l) applyKeys config@(XConfig {modMask = modm}) = return $ config { keys = keymap, mouseBindings = mouseMap } -newMouse :: IO (XConfig l -> Map (KeyMask, Button) (Window -> X ())) -newMouse = - return $ \config@(XConfig {modMask = modm}) -> - Map.fromList [ - ((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster) - , ((modm, button2), windows . (W.shiftMaster .) . W.focusWindow) - , ((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster) - - , ((modm, 6), const (relativeWorkspaceShift prev)) - , ((modm, 7), const (relativeWorkspaceShift next)) - - , ((modm, 8), const (relativeWorkspaceShift prev)) - , ((modm, 9), const (relativeWorkspaceShift next)) - ] - click :: X () click = do (dpy, root) <- asks $ (,) <$> display <*> theRoot -- cgit From 0c8f4b67032a6bb226665bad60417f1007cd60ee Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 22 Nov 2021 17:09:47 -0700 Subject: Mess with some other keybindings. --- src/Internal/Keys.hs | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) (limited to 'src/Internal/Keys.hs') diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 88b90dc..dec7f44 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -54,12 +54,12 @@ keymap = runKeys $ do bind xK_apostrophe $ do justMod $ subkeys $ do bind xK_apostrophe $ - justMod jumpToLast + (noMod -|- justMod) jumpToLast mapAlpha 0 jumpToMark shiftMod $ subkeys $ do bind xK_apostrophe $ - shiftMod swapWithLastMark + (noMod -|- shiftMod -|- rawMask shiftMask) swapWithLastMark mapAlpha shiftMask swapWithMark bind xK_BackSpace $ do @@ -69,17 +69,28 @@ keymap = runKeys $ do rawMask mod4Mask $ spawn "xterm" justMod $ spawn "pkill -SIGUSR 1 xmobar" - bind xK_F1 $ + bind xK_F1 $ do -- Button programmed on mouse - shiftMod $ click >> withFocused (windows . W.sink) + rawMask shiftMask $ click >> withFocused (windows . W.sink) + + shiftMod $ spawn "spotify-control play" bind xK_F2 $ -- Button programmed on mouse - shiftMod $ click >> sendMessage ToggleZoom + rawMask shiftMask $ click >> sendMessage ToggleZoom bind xK_F3 $ -- Button programmed on mouse - shiftMod $ click >> kill + rawMask shiftMask $ subkeys $ do + + bind xK_F1 $ -- Make it harder to close so I don't accidentally git it. + rawMask shiftMask $ click >> kill + + -- I Don't really use these, but they could be bound to something cool! + bind xK_F2 $ + rawMask shiftMask $ spawn "spotify-control next" + bind xK_F3 $ + rawMask shiftMask $ spawn "spotify-control prev" bind xK_F10 $ do justMod $ spawn "spotify-control play" @@ -109,10 +120,10 @@ keymap = runKeys $ do shiftMod $ withScreen W.shift idx bind xK_bracketright $ do - justMod $ sendMessage $ modifyWindowBorder (-1) + justMod $ sendMessage $ modifyWindowBorder 5 bind xK_bracketleft $ do - justMod $ sendMessage $ modifyWindowBorder 1 + justMod $ sendMessage $ modifyWindowBorder (-5) bind xK_b $ do justMod $ spawn "bluetooth-select.sh" @@ -192,7 +203,18 @@ keymap = runKeys $ do justMod $ sendMessage ToggleStruts bind xK_z $ do - justMod $ sendMessage ToggleZoom + justMod $ subkeys $ do + -- Z is reserved to create sub keybindings to do various things. + -- I don't really use these at the moment. + bind xK_h $ do + noMod $ spawn "spotify-control prev" + + bind xK_l $ do + noMod $ spawn "spotify-control next" + + -- Centers the current focused window. i.e. toggles the Zoom layout + -- modifier. + shiftMod $ sendMessage ToggleZoom mouseMap :: ButtonsMap l mouseMap = runButtons $ do @@ -212,10 +234,10 @@ mouseMap = runButtons $ do justMod $ const (relativeWorkspaceShift next) bind (8 :: Button) $ - justMod $ const (relativeWorkspaceShift prev) + justMod $ const $ spawn "spotify-control prev" bind (9 :: Button) $ - justMod $ const (relativeWorkspaceShift next) + justMod $ const $ spawn "spotify-control next" applyKeys :: XConfig l -> IO (XConfig l) applyKeys config@(XConfig {modMask = modm}) = -- cgit