我是Xmonad的新手(昨天才安装了它),并且由于我以前从未使用过haskell,所以发现配置对我来说有些混乱。我可以使xmobar和trayer正常工作,但是我不知道如何制作多媒体键来调节音量。有人可以帮忙吗?
附加问题:如何在xmonad中管理音量。您是否使用任务栏图标或类似的东西?
这是我的xmonad配置:
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")
]