I have been trying to get my head around xmobar with xmonad on Arch. Some things work and some I just cant get to work.
I cannot for the life of my get glyph fonts to work/appear even when they are installed on the system.
Some of plugins - Battery, Network, Xmonadlog and Wireless just hang at "updating" while others; CPU, swap, date etc work just fine.
There are no errors coming up in xsessions.error log.
My .xmobarrc
file:
1 Config { additionalFonts = [ "xft:FontAwesome-4:size=11:antilias=true" ]
2 , border = TopB
3 , alpha = 255
4 , allDesktops = True
5 , font = "xft:iosevka-9"
6 , bgColor = "#5f5f5f"
7 , fgColor = "#f8f8f2"
8 , position = TopW L 100 -- Top with fixed width 100% left aligned.
9 , overrideRedirect = True
10 , lowerOnStart = True
11 , persistent = True
12 , commands = [ Run Cpu
13 [ "-L", "3"
14 , "-H", "50"
15 , "--high" , "red"
16 , "--normal", "green"
17 ] 10
18 , Run Network "enp2s0f0" ["-t", "<fn=1>\xf8f5</fn>
19 <rx>kb <fn=1>\xfa51</fn> <tx>kb"] 20
20 , Run Wireless "wlan0" [ "-t", "<essid>" ] 10
21 , Run Alsa "default" "Master"
22 [ "--template", "v: <volumestatus>"
23 , "--suffix" , "True"
24 , "--"
25 , "--on", ""
26 ]
27 , Run Memory ["--template", "Mem: <usedratio>%"
28 , "-L", "0"
29 , "-H", "70"
30 , "--high", "red"
31 , "--normal", "green" ] 10
32 , Run Swap [] 10
33 , Run Date "<fn=1>\xe62b</fn> %a %d-%m-%Y <fc=#8be9fd>%H:%M</fc>" "date" 10
34 , Run Com "uname" ["-s","-r"] "" 36000
35 , Run XMonadLog
36 -- battery monitor
37 , Run Battery [ "--template" , "Batt: <acstatus>"
38 , "--Low" , "10" -- units: %
39 , "--High" , "80" -- units: %
40 , "--low" , "darkred"
41 , "--normal" , "darkorange"
42 , "--high" , "darkgreen"
43 , "--" -- battery specific options
44 -- discharging status
45 , "-o" , "<left>% (<timeleft>)"
46 -- AC "on" status
47 , "-O" , "<fc=#dAA520>Charging</fc>"
48 -- charged status
49 , "-i" , "<fc=#006000>Charged</fc>"
50 ] 50
51 ]
52 , sepChar = "%"
53 , alignSep = "}{"
54 , template = " %uname% | %XMonadLog% | %Battery%}{ %alsa:default:Master% | %cpu%
55 | %memory% | %swap% | %network% | %Wireless% | %date% "
56 }
Do you need to do some magical other things to get glyph fonts and those hanging plugins working?
Adding the glyphs as characters works for me, i.e. <fn=1></fn>
instead of <fn=1>\xf8f5</fn>
. (The glyph won't show correctly here on StackOverflow, though...)
Network "enp2s0f0" []
requires you to use %enp2s0f0%
, not %network%
.
Likewise but with the added suffix wi
, Wireless "wlan0" []
requires you to use %wlan0wi%
, not %Wireless%
.
I don't use Battery
and XMonadLog
but the Codeberg documentation on Plugins and monitors probably provides some useful information for Battery and XMonadLog.