summaryrefslogtreecommitdiff
path: root/accounts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-05-26 13:09:02 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2023-05-26 13:09:02 +0200
commit8d39e40bcf6da354c2e5ff2f1b4b8981c5fcf7f5 (patch)
tree2aa5f320d974970d781d82952adf0ef041c649e6 /accounts
parent2ad3bd527e7460568097024a4c33d08c4689e65c (diff)
downloadnixos-8d39e40bcf6da354c2e5ff2f1b4b8981c5fcf7f5.tar
nixos-8d39e40bcf6da354c2e5ff2f1b4b8981c5fcf7f5.tar.gz
nixos-8d39e40bcf6da354c2e5ff2f1b4b8981c5fcf7f5.tar.bz2
nixos-8d39e40bcf6da354c2e5ff2f1b4b8981c5fcf7f5.tar.xz
nixos-8d39e40bcf6da354c2e5ff2f1b4b8981c5fcf7f5.zip
...
Diffstat (limited to 'accounts')
-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 ()