Skip to content

Instantly share code, notes, and snippets.

@txtyash
Created July 20, 2022 10:20
Show Gist options
  • Save txtyash/a2e7260cf127bbda943a5169d284359b to your computer and use it in GitHub Desktop.
Save txtyash/a2e7260cf127bbda943a5169d284359b to your computer and use it in GitHub Desktop.
My xmobarrc for xmonad
-- Use the Nord theme: https://www.nordtheme.com/docs/colors-and-palettes
Config {
-- appearance
-- Hasklug is a much more readable font than mononoki, esp cus my bar is a bit small
font = "xft:FuraCode Nerd Font:weight=bold:pixelsize=14:antialias=true:hinting=true"
, bgColor = "#2E3440"
, fgColor = "#D8DEE9"
, position = Bottom
, border = BottomB
, borderColor = "#646464"
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
, template = "  %StdinReader% }{ %dynnetwork% %wifi% %multicoretemp% %multicpu% %memory% %alsa:default:Master% %battery% %date% "
-- 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 automatically 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 =
[Run MultiCpu [ "--template" , ": <total0>% <total1>%"
, "--Low" , "50" -- units: %
, "--High" , "85" -- units: %
, "--low" , "#A3BE8C"
, "--normal" , "#EBCB8B"
, "--high" , "#BF616A"
] 10
, Run MultiCoreTemp ["-t", ": <avg>°C <avgpc>%",
"-L", "60", "-H", "80",
"-l", "#A3BE8C", "-n", "#EBCB8B", "-h", "#BF616A",
"--", "--mintemp", "20", "--maxtemp", "100"] 50
, Run Memory [ "--template" ,": <usedratio>%"
, "--Low" , "20" -- units: %
, "--High" , "90" -- units: %
, "--low" , "#A3BE8C"
, "--normal" , "#EBCB8B"
, "--high" , "#BF616A"
] 10
, Run Battery
[ "--template" , "<acstatus>"
, "--Low" , "10" -- units: %
, "--High" , "80" -- units: %
, "--low" , "#BF616A"
, "--normal" , "#EBCB8B"
, "--high" , "#A3BE8C"
, "--" -- battery specific options
-- discharging status - use icons
, "-l" , "#BF616A"
, "-m" , "#EBCB8B"
, "-h" , "#A3BE8C"
, "-o" , ""
, "--lows" , ": <left>% <timeleft>"
, "--mediums" , ": <left>% <timeleft>"
, "--highs" , ": <left>% <timeleft>"
-- AC "on" status
, "-O" , ": <left>% <timeleft>"
-- charged status
, "-i" , ""
, "-a", "notify-send -u critical 'Battery running out!!'"
, "-A", "20"
] 50
, Run Date "%a %d <fc=#EBCB8B>%H:%M:%S</fc>" "date" 10
-- USE %VAPO% for weather module
, Run WeatherX "VAPO" -- https://en.wikipedia.org/wiki/List_of_airports_by_ICAO_code:_V
[ ("clear", "望")
, ("sunny", "")
, ("mostly clear", "")
, ("mostly sunny", "盛")
, ("partly sunny", "")
, ("fair", "")
, ("cloudy","")
, ("overcast","")
, ("partly cloudy", "杖")
, ("mostly cloudy", "")
, ("considerable cloudiness", "")]
["-t", "<skyConditionS> <tempF>宅  <rh>%  <windKmh>"
, "-L","10", "-H", "25", "--normal", "#646464"
, "--high", "#EBCB8B", "--low", "#A3BE8C"]
1800
, Run StdinReader
, Run Alsa "default" "Master" [
"--template" , "<status>"
, "--"
, "-C" , "#A3BE8C"
, "-c" , "#BF616A"
, "-O", "<volume>%"
, "-o", "ﱝ"
, "--highs", " "
, "--mediums", "墳 "
, "--lows", "奔 "
]
, Run DynNetwork ["--template", "▼ <rx>KB ▲ <tx>KB", "--", "--devices", "wlp1s0,enp0s31f6"] 10
, Run Com "/home/zim/.config/xmonad/xmobar/wireless.sh" [] "wifi" 30
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment