diff options
author | azahi <azahi@teknik.io> | 2018-08-16 17:12:34 +0300 |
---|---|---|
committer | azahi <azahi@teknik.io> | 2018-08-16 17:12:34 +0300 |
commit | a9ff90233d9376a466f0788117fe86ccf7596e59 (patch) | |
tree | ddafe38c5b6cfb1e26833d015de2c56e7068b423 /src/XMonad/Custom/Bindings.hs | |
parent | Minor fixes and code refactoring (diff) |
Release 0.2.1.1
Diffstat (limited to 'src/XMonad/Custom/Bindings.hs')
-rw-r--r-- | src/XMonad/Custom/Bindings.hs | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/XMonad/Custom/Bindings.hs b/src/XMonad/Custom/Bindings.hs index 9192f7e..19eaa2a 100644 --- a/src/XMonad/Custom/Bindings.hs +++ b/src/XMonad/Custom/Bindings.hs @@ -64,7 +64,7 @@ import XMonad.Util.XSelection showKeyBindings :: [((KeyMask, KeySym), NamedAction)] -> NamedAction showKeyBindings a = addName "Show Keybindings" $ io $ do - p <- spawnPipe "/usr/bin/zenity --text-info" -- TOOD Find an application that doesn't rely on any toolkits + p <- spawnPipe "zenity --text-info" -- TOOD Find an application that doesn't rely on any toolkits hPutStr p $ unlines $ showKm a hClose p return () @@ -114,8 +114,7 @@ keyBindings c = let subKeys s ks = subtitle s:mkNamedKeymap c ks in subKeys "System" - [ ("M-q" , addName "Restart XMonad" $ spawn "/usr/bin/xmonad --restart") - , ("M-C-q" , addName "Recompile & restart XMonad" $ spawn "/usr/bin/xmonad --recompile && /usr/bin/xmonad --restart") + [ ("M-q" , addName "Restart XMonad" $ spawn "xmonad-ng --restart") , ("M-S-q" , addName "Quit XMonad" $ confirmPrompt hotPromptTheme "Quit XMonad?" $ io exitSuccess) , ("M-x" , addName "Shell prompt" $ shellPrompt promptTheme) , ("M-o" , addName "Goto W prompt" $ windowPrompt promptTheme Goto allWindows) @@ -137,7 +136,7 @@ keyBindings c = \xcast.sh --webm") , ("M-S-<Insert>" , addName "Start recording screen as gif" $ spawn "~/.xmonad/bin/\ \xcast.sh --gif") - , ("M-C-<Insert>" , addName "Stop recording" $ spawn "/usr/bin/pkill ffmpeg") + , ("M-C-<Insert>" , addName "Stop recording" $ spawn "pkill ffmpeg") , ("M-C-c" , addName "Toggle compton on/off" $ spawn "~/.xmonad/bin/\ \toggle-compton.sh") , ("M-C-r" , addName "Toggle redshift on/off" $ spawn "~/.xmonad/bin/\ @@ -153,11 +152,24 @@ keyBindings c = , ("<XF86AudioLowerVolume>" , addName "ALSA: Lower volume" $ void $ lowerVolume 5) , ("<XF86AudioRaiseVolume>" , addName "ALSA: Raise volume" $ void $ raiseVolume 5) , ("<XF86AudioPlay>" , addName "MPD: Play/pause" $ spawn "~/.xmonad/bin/mpc-play-pause.sh") - , ("<XF86AudioStop>" , addName "MPD: Stop" $ spawn "/usr/bin/mpc --no-status stop") - , ("<XF86AudioPrev>" , addName "MPD: Previos track" $ spawn "/usr/bin/mpc --no-status prev") - , ("<XF86AudioNext>" , addName "MPD: Next track" $ spawn "/usr/bin/mpc --no-status next") + , ("<XF86AudioStop>" , addName "MPD: Stop" $ spawn "mpc --no-status stop") + , ("<XF86AudioPrev>" , addName "MPD: Previos track" $ spawn "mpc --no-status prev") + , ("<XF86AudioNext>" , addName "MPD: Next track" $ spawn "mpc --no-status next") ] ^++^ + subKeys "Workspaces & Projects" + ( [ ("M-w" , addName "Switch to project" $ switchProjectPrompt promptTheme) + , ("M-S-w" , addName "Shift to project" $ shiftToProjectPrompt promptTheme) + , ("M-," , addName "Next non-empty WS" nextNonEmptyWS) + , ("M-." , addName "Previous non-empty WS" prevNonEmptyWS) + , ("M-i" , addName "Toggle last WS" $ toggleWS' ["NSP"]) + , ("M-`" , addName "WS prompt" $ workspacePrompt promptTheme $ windows . S.shift) + ] + ++ zipM "M-" "View WS" wsKeys [0 ..] (withNthWorkspace S.greedyView) + ++ zipM "M-S-" "Move W to WS" wsKeys [0 ..] (withNthWorkspace S.shift) + ++ zipM "M-C-S-" "Copy W to WS" wsKeys [0 ..] (withNthWorkspace copy) + ) + ^++^ subKeys "Spawnables" [ ("M-<Return>" , addName "Terminal" $ spawn (CM.term CM.customApplications)) , ("M-b" , addName "Browser" $ spawn (CM.browser CM.customApplications)) @@ -196,19 +208,6 @@ keyBindings c = ++ zipM' "M-C-" "Swap W to screen" arrowKeys directions screenSwap True ) ^++^ - subKeys "Workspaces & Projects" - ( [ ("M-w" , addName "Switch to project" $ switchProjectPrompt promptTheme) - , ("M-S-w" , addName "Shift to project" $ shiftToProjectPrompt promptTheme) - , ("M-," , addName "Next non-empty WS" nextNonEmptyWS) - , ("M-." , addName "Previous non-empty WS" prevNonEmptyWS) - , ("M-i" , addName "Toggle last WS" $ toggleWS' ["NSP"]) - , ("M-`" , addName "WS prompt" $ workspacePrompt promptTheme $ windows . S.shift) - ] - ++ zipM "M-" "View WS" wsKeys [0 ..] (withNthWorkspace S.greedyView) - ++ zipM "M-S-" "Move W to WS" wsKeys [0 ..] (withNthWorkspace S.shift) - ++ zipM "M-C-S-" "Copy W to WS" wsKeys [0 ..] (withNthWorkspace copy) - ) - ^++^ subKeys "Layout Management" [ ("M-<Tab>" , addName "Cycle layouts" $ sendMessage NextLayout) , ("M-C-<Tab>" , addName "Cycle sublayouts" $ toSubl NextLayout) |