Skip to content

Instantly share code, notes, and snippets.

@fabioyamate
Created Mar 14, 2017
Embed
What would you like to do?
Xmonad config
Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, borderColor = "black"
, border = TopB
, bgColor = "black"
, fgColor = "grey"
, position = TopW L 100
, commands = [ Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Swap [] 10
, Run Com "uname" ["-s","-r"] "" 36000
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% | %cpu% | %memory% }{<fc=#ee9a00>%date%</fc> | %uname%"
}
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run (spawnPipe)
import XMonad.Util.EZConfig (additionalKeys)
import System.IO
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ defaultConfig
{ terminal = "urxvt"
, modMask = mod4Mask -- windows key
, borderWidth = 3
, manageHook = manageDocks <+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, handleEventHook = handleEventHook defaultConfig <+> docksEventHook
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment