From 62d085de1185e505f535db6f7be323235e4899fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 13 Jul 2025 22:37:08 +0200 Subject: [PATCH] vanadium/xmonad: powerprofilesctl bindings --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 8555c888..cab94f4b 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -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"