128 lines
6.2 KiB
Haskell
128 lines
6.2 KiB
Haskell
Config {
|
|
|
|
-- appearance
|
|
font = "xft:Fira Code:size=9:antialias=true:hinting=true"
|
|
, bgColor = "#121e32"
|
|
, fgColor = "#dfdfef"
|
|
, position = Top
|
|
, border = BottomB
|
|
, borderColor = "#121e32"
|
|
, iconRoot = "/home/solomon/.xmonad/xpm/" -- default: "."
|
|
|
|
-- layout
|
|
, sepChar = "%" -- delineator between plugin names and straight text
|
|
, alignSep = "}{" -- separator between left-right alignment
|
|
, template = " <action=`xdotool key super+a`><icon=haskell_20.xpm/></action> %cpu% %memory% %dynnetwork% %battery% } %UnsafeStdinReader% { %date% <fc=#9da5ae>|</fc> %YPAD% <fc=#9da5ae>|</fc> %updates% %trayerpad%"
|
|
|
|
-- general behavior
|
|
, lowerOnStart = True -- send to bottom of window stack on start
|
|
, hideOnStart = False -- start with window unmapped (hidden)
|
|
, allDesktops = True -- show on all desktops
|
|
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
|
|
, pickBroadest = False -- choose widest display (multi-monitor)
|
|
, persistent = True -- enable/disable hiding (True = disabled)
|
|
|
|
-- plugins
|
|
-- Numbers can be automaticallJy colored according to their value. xmobar
|
|
-- decides color based on a three-tier/two-cutoff system, controlled by
|
|
-- command options:
|
|
-- --Low sets the low cutoff
|
|
-- --High sets the high cutoff
|
|
--
|
|
-- --low sets the color below --Low cutoff
|
|
-- --normal sets the color between --Low and --High cutoffs
|
|
-- --High sets the color above --High cutoff
|
|
--
|
|
-- The --template option controls how the plugin is displayed. Text
|
|
-- color can be set by enclosing in <fc></fc> tags. For more details
|
|
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
|
|
, commands =
|
|
-- weather monitor
|
|
[ Run Weather "YPAD" ["--template" , "<station>: <tempC>C"
|
|
, "--Low" , "10"
|
|
, "--High" , "25"
|
|
, "--normal" , "#95C05D"
|
|
, "--high" , "#882410"
|
|
, "--low" , "lightblue"
|
|
] 36000
|
|
|
|
-- network activity monitor
|
|
-- , Run Network "enp33s0" [ "--template" , "eth: <icon=net_up_20.xpm/><tx>kB/s <icon=net_down_20.xpm/><rx>kB/s"
|
|
-- , "--Low" , "100000" -- units: B/s
|
|
-- , "--High" , "500000" -- units: B/s
|
|
-- , "--low" , "#95C05D"
|
|
-- , "--normal" , "#ee9a00"
|
|
-- , "--high" , "#882410"
|
|
-- ] 10
|
|
-- , Run Network "wlp36s0" [ "--template" , "wlan: <icon=net_up_20.xpm/><tx>kB/s <icon=net_down_20.xpm/><rx>kB/s"
|
|
-- , "--Low" , "100000" -- units: B/s
|
|
-- , "--High" , "500000" -- units: B/s
|
|
-- , "--low" , "#95C05D"
|
|
-- , "--normal" , "#ee9a00"
|
|
-- , "--high" , "#882410"
|
|
-- ] 10
|
|
|
|
-- network activity monitor (dynamic interface resolution)
|
|
, Run DynNetwork [ "--template" , "net: <tx>kB/s <rx>kB/s"
|
|
, "--Low" , "100000" -- units: B/s
|
|
, "--High" , "500000" -- units: B/s
|
|
, "--low" , "#95C05D"
|
|
, "--normal" , "#ee9a00"
|
|
, "--high" , "#882410"
|
|
] 10
|
|
|
|
-- cpu activity monitor
|
|
, Run Cpu [ "--template" , "cpu: <total>%"
|
|
, "--Low" , "30" -- units: %
|
|
, "--High" , "60" -- units: %
|
|
, "--low" , "#95C05D"
|
|
, "--normal" , "#ee9a00"
|
|
, "--high" , "#882410"
|
|
] 10
|
|
|
|
-- memory usage monitor
|
|
-- , Run Memory [ "--template" ,"mem: <usedratio>% (<used>Mb)"
|
|
, Run Memory [ "--template" ,"mem: <usedratio>%"
|
|
, "--Low" , "20" -- units: %
|
|
, "--High" , "70" -- units: %
|
|
, "--low" , "#95C05D"
|
|
, "--normal" , "#ee9a00"
|
|
, "--high" , "#882410"
|
|
] 10
|
|
|
|
-- time and date indicator
|
|
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time)
|
|
, Run Date "%a %d %b %H:%M" "date" 10
|
|
|
|
-- keyboard layout indicator
|
|
-- , Run Kbd [ ("us(dvorak)" , "DV")
|
|
-- , ("us" , "US")
|
|
-- ]
|
|
|
|
-- Battery information. This is likely to require some customization
|
|
-- based upon your specific hardware. Or, for a desktop you may want
|
|
-- to just remove this section entirely.
|
|
, Run BatteryP ["BAT0"]
|
|
[ "--template", "<acstatus> <left>%, <timeleft>"
|
|
, "-L", "10", "-H", "80"
|
|
, "-l", "#882410", "-h", "#95C05D"
|
|
, "--", "-O", "Charging", "-o", "Battery"
|
|
-- , "-a", "notify-send -u critical 'Battery running out!!'"
|
|
-- , "-A", "10"
|
|
] 10
|
|
|
|
-- Runs a standard shell command 'uname -r' to get kernel version
|
|
-- , Run Com "uname" ["-r"] "" 3600
|
|
|
|
-- Runs a simple script that counts the number of system updates to apply
|
|
, Run Com "/home/solomon/.config/xmobar/count-updates.sh" [] "updates" 3600
|
|
|
|
-- Script that dynamically adjusts xmobar padding depending on number of trayer icons.
|
|
, Run Com "/home/solomon/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20
|
|
|
|
-- Prints out the left side items such as workspaces, layout, etc.
|
|
, Run UnsafeStdinReader
|
|
|
|
]
|
|
}
|