diff --git a/xmonad.hs b/xmonad.hs index 87895b9..40e7ad4 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -455,6 +455,12 @@ runMaxBacklight = spawnCmd "adj_backlight" ["max"] showWorkspace tag = windows $ W.view tag +enableDPMS :: X () +enableDPMS = spawnCmd "xset" ["s", "on", "+dpms"] + +disableDPMS :: X () +disableDPMS = spawnCmd "xset" ["s", "off", "-dpms"] + -- keybindings showKeybindings :: [((KeyMask, KeySym), NamedAction)] -> NamedAction @@ -563,6 +569,8 @@ myKeys c = , ("M-,", addName "backlight down" runDecBacklight) , ("M-M1-,", addName "backlight min" runMaxBacklight) , ("M-M1-.", addName "backlight max" runMinBacklight) + , ("M-M1-=", addName "enable screensaver" enableDPMS) + , ("M-M1--", addName "disable screensaver" disableDPMS) , ("M-", addName "restart xmonad" $ runCleanup >> runRestart) , ("M-S-", addName "recompile xmonad" $ runCleanup >> runRecompile) , ("M-", addName "power menu" myPowerPrompt)