vanadium/xmonad: powerprofilesctl bindings

This commit is contained in:
Primrose 2025-07-13 22:37:08 +02:00
parent a6cd6515a6
commit 62d085de11
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -4,7 +4,7 @@
import XMonad
import XMonad.Actions.SwapWorkspaces(swapWithCurrent)
import XMonad.Actions.Submap (submap)
import XMonad.Actions.Submap (submap, visualSubmap)
import XMonad.Util.EZConfig (additionalKeys, removeKeys)
import XMonad.Util.NamedScratchpad (NamedScratchpad (NS),
@ -228,6 +228,17 @@ main = xmonad
, ((superMask, xK_l), spawn lock )
])
++ (let
powerprofile p = (p, spawn $ "powerprofilesctl set " ++ p)
in
[ ( (superMask, xK_p), visualSubmap def $ M.fromList
[ ((0, xK_1), powerprofile "power-saver")
, ((0, xK_2), powerprofile "balanced" )
, ((0, xK_3), powerprofile "performance")
]
)
])
myTerm :: String
myTerm = "kitty"