add system key bindings
This commit is contained in:
parent
5be89b24e1
commit
a7c09f875e
2 changed files with 25 additions and 0 deletions
24
src/XMonad/Custom/SystemKeyBindings.hs
Normal file
24
src/XMonad/Custom/SystemKeyBindings.hs
Normal file
|
@ -0,0 +1,24 @@
|
|||
module XMonad.Custom.SystemKeyBindings (mySystemKeyBindings) where
|
||||
|
||||
import XMonad
|
||||
|
||||
import XMonad.Custom.BindingUtils
|
||||
|
||||
mySystemKeyBindings :: [([Char], X ())]
|
||||
mySystemKeyBindings = addSubMapKey mySystemKey $ [
|
||||
("p", spawn "poweroff"),
|
||||
("r", systemctl "reboot"),
|
||||
("l", i3lock),
|
||||
("s", i3lock <+> systemctl "suspend"),
|
||||
("h", i3lock <+> systemctl "hibernate"),
|
||||
("t", i3lock <+> systemctl "hybrid-sleep")
|
||||
]
|
||||
where
|
||||
mySystemKey = "<Escape>"
|
||||
|
||||
|
||||
i3lock :: X()
|
||||
i3lock = spawn "i3lock-fancy --pixelate -- maim"
|
||||
|
||||
systemctl :: String -> X()
|
||||
systemctl cmd = spawn $ "systemctl " ++ cmd
|
|
@ -11,6 +11,7 @@ flag pedantic
|
|||
library
|
||||
exposed-modules: XMonad.Custom.BindingUtils
|
||||
XMonad.Custom.BasicKeyBindings
|
||||
XMonad.Custom.SystemKeyBindings
|
||||
XMonad.Custom.UniversitySetup
|
||||
hs-source-dirs: src
|
||||
ghc-options: -funbox-strict-fields -Wall -Wno-unused-do-bind
|
||||
|
|
Loading…
Reference in a new issue