I am new to Xmonad (just installed it yesterday), and since I have never used haskell before, I found configuration a little bit confusing for me. I got somewhat made xmobar and trayer work, but I have no idea how might I make multimedia keys to adjust volume. Can anyone help with that?
Additional question: How do you manage your volume in xmonad. Do you use tray icon, or other things like that?
Here is my xmonad configuration:
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
main = xmonad =<< statusBar myBar myPP toggleStrutKey myConfig
-- Command to launch the bar
myBar = "xmobar"
-- Custom PP, it determines what is written to the bar
myPP = xmobarPP { ppCurrent = xmobarColor "#429942" "" . wrap "<" ">" }
-- Key bindings to toggle the gap for the bar
toggleStrutKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b)
myConfig = defaultConfig {
manageHook = manageDocks <+> manageHook defaultConfig,
layoutHook = avoidStruts $ layoutHook defaultConfig,
modMask = mod4Mask -- Rebind Mod to windows key
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
]