summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/xmonad
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/xmonad')
-rw-r--r--accounts/gkleen@sif/xmonad/xmonad.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs
index d6e32aab..906cc663 100644
--- a/accounts/gkleen@sif/xmonad/xmonad.hs
+++ b/accounts/gkleen@sif/xmonad/xmonad.hs
@@ -896,7 +896,7 @@ myKeys' conf host = Map.fromList $
896 safeSpawn "loginctl" ["lock-session", sessId] 896 safeSpawn "loginctl" ["lock-session", sessId]
897 ) 897 )
898 , ((modm .|. shiftMask, xK_s ), safeSpawn "systemctl" ["suspend"]) 898 , ((modm .|. shiftMask, xK_s ), safeSpawn "systemctl" ["suspend"])
899 , ((modm .|. shiftMask, xK_h ), safeSpawn "systemctl" ["poweroff"]) 899 , ((modm .|. shiftMask, xK_h ), inputPromptWithCompl xPConfigMonospace "systemctl" powerActCompl ?+ powerAct)
900 , ((modm, xK_v ), windows copyToAll) -- @@ Make focused window always visible 900 , ((modm, xK_v ), windows copyToAll) -- @@ Make focused window always visible
901 , ((modm .|. shiftMask, xK_v ), killAllOtherCopies) -- @@ Toggle window state back 901 , ((modm .|. shiftMask, xK_v ), killAllOtherCopies) -- @@ Toggle window state back
902 , ((modm .|. shiftMask, xK_g ), windowPrompt xPConfig Goto wsWindows) 902 , ((modm .|. shiftMask, xK_g ), windowPrompt xPConfig Goto wsWindows)
@@ -925,3 +925,8 @@ myKeys' conf host = Map.fromList $
925 modm = XMonad.modMask conf 925 modm = XMonad.modMask conf
926 926
927 brCycle = [0, 1 % 100, 1 % 10, 1 % 4, 1 % 2, 3 % 4, 1] 927 brCycle = [0, 1 % 100, 1 % 10, 1 % 4, 1 % 2, 3 % 4, 1]
928
929 powerActWords = ["poweroff", "reboot", "hibernate", "suspend"]
930 powerActCompl = mkComplFunFromList' xPConfigMonospace powerActWords
931 powerAct act | act `elem` powerActWords = safeSpawn "systemctl" $ pure act
932 | otherwise = return ()