xmonad: added volume controls

This commit is contained in:
Serĉanto de Scio 2022-12-19 00:50:10 +10:00
parent d3c56cfffd
commit 6da0d07b15
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA

View file

@ -174,7 +174,7 @@ promptTheme =
-- Applications -- -- Applications --
------------------ ------------------
brightnessDown, brightnessUp, browser, discord, editor, element, incognitoBrowser, iogBrowser, launcher, logseq, musicPlayer, obs, screenshot, slack, myTerminal :: String brightnessDown, brightnessUp, browser, discord, editor, element, incognitoBrowser, iogBrowser, launcher, logseq, musicPlayer, obs, screenshot, slack, myTerminal, volumeDown, volumeMute, volumeUp :: String
brightnessDown = "light -U 5" brightnessDown = "light -U 5"
brightnessUp = "light -A 5" brightnessUp = "light -A 5"
browser = "brave" browser = "brave"
@ -195,6 +195,9 @@ slack = "slack"
myTerminal = "termonad" myTerminal = "termonad"
myScreenLockCmd = "xscreensaver --no-splash" myScreenLockCmd = "xscreensaver --no-splash"
myScreenLock = "xscreensaver-command -lock" myScreenLock = "xscreensaver-command -lock"
volumeDown = "amixer set Master 2%-"
volumeMute = "amixer set Master toggle"
volumeUp = "amixer set Master 2%+"
-------------- --------------
-- Keybinds -- -- Keybinds --
@ -220,6 +223,9 @@ myKeybinds =
("M-C-w", shiftToProjectPrompt promptTheme), ("M-C-w", shiftToProjectPrompt promptTheme),
("M-w", switchProjectPrompt promptTheme), ("M-w", switchProjectPrompt promptTheme),
-- Environment controls -- Environment controls
("<XF86AudioLowerVolume>", spawn volumeDown),
("<XF86AudioMute>", spawn volumeMute),
("<XF86AudioRaiseVolume>", spawn volumeUp),
("<XF86MonBrightnessDown>", spawn brightnessDown), ("<XF86MonBrightnessDown>", spawn brightnessDown),
("<XF86MonBrightnessUp>", spawn brightnessUp) ("<XF86MonBrightnessUp>", spawn brightnessUp)
] ]