[XMonad] Add raiseNextMaybe commands

This commit is contained in:
Ivan Malison 2016-10-24 19:41:21 -07:00
parent bfbece987e
commit f30e12c917
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -15,6 +15,7 @@ import XMonad hiding ( (|||) )
import XMonad.Actions.CycleWS import XMonad.Actions.CycleWS
import qualified XMonad.Actions.DynamicWorkspaceOrder as DWO import qualified XMonad.Actions.DynamicWorkspaceOrder as DWO
import XMonad.Actions.WindowBringer import XMonad.Actions.WindowBringer
import XMonad.Actions.WindowGo
import XMonad.Actions.WorkspaceNames import XMonad.Actions.WorkspaceNames
import XMonad.Config () import XMonad.Config ()
import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.EwmhDesktops
@ -125,6 +126,13 @@ addKeys conf@XConfig {modMask = modm} =
, ((modm .|. shiftMask, xK_m), sendMessage RestoreNextMinimizedWin) , ((modm .|. shiftMask, xK_m), sendMessage RestoreNextMinimizedWin)
, ((modm, xK_backslash), toggleWS) , ((modm, xK_backslash), toggleWS)
-- App shortcuts
, ((modalt, xK_s), raiseNextMaybe (spawn "spotify") (className =? "Spotify"))
, ((modalt, xK_e), raiseNextMaybe (spawn "emacsclient -c") (className =? "Emacs"))
, ((modalt, xK_h), raiseNextMaybe (spawn "google-chrome") (className =? "google-chrome"))
, ((modalt, xK_h), raiseNextMaybe (spawn "cool")
(className =? "google-chrome"))
-- Hyper bindings -- Hyper bindings
, ((mod3Mask, xK_1), setWorkspaceNames) , ((mod3Mask, xK_1), setWorkspaceNames)
, ((mod3Mask, xK_e), moveTo Next EmptyWS ) , ((mod3Mask, xK_e), moveTo Next EmptyWS )
@ -158,6 +166,8 @@ addKeys conf@XConfig {modMask = modm} =
[ (W.greedyView, 0) [ (W.greedyView, 0)
, (W.shift, shiftMask) , (W.shift, shiftMask)
, (shiftThenView, controlMask)]] , (shiftThenView, controlMask)]]
where
modalt = modm .|. mod1Mask
-- Local Variables: -- Local Variables:
-- flycheck-ghc-args: ("-Wno-missing-signatures") -- flycheck-ghc-args: ("-Wno-missing-signatures")