SHARE
TWEET

XMonad config

a guest Nov 18th, 2018 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import XMonad
  2. import XMonad.Hooks.ManageDocks   (ToggleStruts(..),avoidStruts,docks,manageDocks)
  3. import XMonad.Hooks.DynamicLog
  4. import XMonad.Util.EZConfig(additionalKeysP)
  5. import XMonad.Layout.NoBorders(smartBorders)
  6. import XMonad.Hooks.ManageHelpers
  7. -- import XMonad.Actions.SpawnOn
  8. import XMonad.Util.SpawnOnce
  9.  
  10. myWorkspaces    = ["main","terms","code","other1","other2"]
  11.  
  12. myConfig = docks defaultConfig
  13.         { manageHook = ( isFullscreen --> doFullFloat ) <+> manageDocks <+> manageHook defaultConfig
  14.         , layoutHook = smartBorders (avoidStruts  $  layoutHook defaultConfig)
  15.         , terminal = "mate-terminal"
  16.         , borderWidth = 2
  17.         , startupHook = myStartupHook
  18.         , focusedBorderColor = "#7CFF00"
  19.         , workspaces    = myWorkspaces
  20.         } `additionalKeysP`
  21.         [ ("<XF86MonBrightnessUp>", spawn "xbacklight -inc 10")
  22.         , ("<XF86MonBrightnessDown>", spawn "xbacklight -dec 5")
  23.         , ("<XF86KbdBrightnessUp>", spawn "/archive/repos/backlights/xkb_backlight_key up 10")
  24.         , ("<XF86KbdBrightnessDown>", spawn "/archive/repos/backlights/xkb_backlight_key down 10")
  25.         , ("<XF86AudioMute>", spawn "amixer -q set Master togglemute")
  26.         , ("<XF86AudioLowerVolume>", spawn "amixer -c 0 -q set Master 2dB-")
  27.         , ("<XF86AudioRaiseVolume>", spawn "amixer -c 0 -q set Master 2dB+")
  28.         , ("<XF86AudioPlay>", spawn "playerctl play-pause")
  29.         , ("<XF86AudioNext>", spawn "playerctl next")
  30.         , ("<XF86AudioPrev>", spawn "playerctl prev")
  31.         , ("M1-C-l", spawn "xautolock -locknow || (killall xautolock; xautolock -time 10 -locker slock & sleep 1; xautolock -locknow)")
  32.         ]
  33.  
  34.  
  35. myStartupHook = do
  36.      spawnOnce "/home/juser/.xmonad/autostart.sh"
  37.  
  38.  
  39. -- The main function.
  40. main = xmonad =<< statusBar myBar myPP toggleStrutsKey myConfig
  41.  
  42. -- Command to launch the bar.
  43. myBar = "xmobar"
  44.  
  45. -- Custom PP, configure it as you like. It determines what is being written to the bar.
  46. myPP = xmobarPP { ppCurrent = xmobarColor "green" "" . wrap "<" ">" . shorten 68}
  47.  
  48. -- Key binding to toggle the gap for the bar.
  49. toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top