xmonad: Reformat main and config

This commit is contained in:
Alexander Kobjolke 2024-03-01 22:41:23 +01:00
parent 329b60662a
commit 7a8e29c90e

View file

@ -60,44 +60,44 @@ changeVolume :: VolumeCommand -> X ()
changeVolume = spawn . interpretVolumeCommand changeVolume = spawn . interpretVolumeCommand
myConfig = myConfig =
ewmhFullscreen $ Docks.docks
ewmh $ . ewmh
Docks.docks $ . ewmhFullscreen
nav $ . nav
def $ def
{ modMask = mod4Mask -- Use Super instead of Alt { modMask = mod4Mask -- Use Super instead of Alt
, terminal = "alacritty" , terminal = "alacritty"
, layoutHook = myLayout , layoutHook = myLayout
, -- this seems to be necessary to make java gui applications work :( , -- this seems to be necessary to make java gui applications work :(
startupHook = ewmhDesktopsStartup >> setWMName "LG3D" startupHook = ewmhDesktopsStartup >> setWMName "LG3D"
} }
`EZ.additionalKeysP` [ ("M-S-z", spawn "xscreensaver-command -lock") `EZ.additionalKeysP` [ ("M-S-z", spawn "xscreensaver-command -lock")
, ("M-S-r", compileRestart True) , ("M-S-r", compileRestart True)
, ("M-S-q", restart "xmonad" True) , ("M-S-q", restart "xmonad" True)
, ("M-C-s", unGrab *> spawn "scrot -s") , ("M-C-s", unGrab *> spawn "scrot -s")
, ("M-b", sendMessage Docks.ToggleStruts) , ("M-b", sendMessage Docks.ToggleStruts)
, ("M-f", sendMessage (Toggle "Full")) , ("M-f", sendMessage (Toggle "Full"))
, ("M-p", spawn appLauncher) , ("M-p", spawn appLauncher)
, ("M-i", spawn passLauncher) , ("M-i", spawn passLauncher)
, ("M-w", kill) , ("M-w", kill)
, ("M-l", WS.toggleWS) , ("M-l", WS.toggleWS)
, ("M-g", WS.prevWS) , ("M-g", WS.prevWS)
, ("M-r", WS.nextWS) , ("M-r", WS.nextWS)
, -- backlight control , -- backlight control
("<XF86MonBrightnessDown>", spawn "xbacklight -dec 5") ("<XF86MonBrightnessDown>", spawn "xbacklight -dec 5")
, ("<XF86MonBrightnessUp>", spawn "xbacklight -inc 5") , ("<XF86MonBrightnessUp>", spawn "xbacklight -inc 5")
, ("<F5>", spawn "xbacklight -dec 5") , ("<F5>", spawn "xbacklight -dec 5")
, ("<F6>", spawn "xbacklight -inc 5") , ("<F6>", spawn "xbacklight -inc 5")
, -- volume control , -- volume control
("<XF86AudioMute>", changeVolume ToggleVolume) ("<XF86AudioMute>", changeVolume ToggleVolume)
, ("<XF86AudioLowerVolume>", changeVolume $ LowerVolume 5) , ("<XF86AudioLowerVolume>", changeVolume $ LowerVolume 5)
, ("<XF86AudioRaiseVolume>", changeVolume $ RaiseVolume 5) , ("<XF86AudioRaiseVolume>", changeVolume $ RaiseVolume 5)
, ("M-a", sendMessage Balance) , ("M-a", sendMessage Balance)
, ("M-S-a", sendMessage Equalize) , ("M-S-a", sendMessage Equalize)
, ("M-o", sendMessage Rotate) , ("M-o", sendMessage Rotate)
] ]
where where
-- navigate using dvorak bindings -- navigate using dvorak bindings
nav = navigation2DP def ("c", "h", "t", "n") [("M-", windowGo), ("M-C-", windowSwap), ("M-S-", windowMoveSplit)] True nav = navigation2DP def ("c", "h", "t", "n") [("M-", windowGo), ("M-C-", windowSwap), ("M-S-", windowMoveSplit)] True