guest@dotshare [~/groups/misc/misc] $ ls i3status-xmobar/ | cat

i3status + xmobar (scrot)

rabbit386 Oct 18, 2021 (misc/misc)

.xmobarrc(raw, dl)

SCROT

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Config { font = "xft:proggytinytt:size=12"
       , additionalFonts = []
       , borderColor = "black"
       , border = TopB
       , bgColor = "black"
       , fgColor = "grey"
       , alpha = 255
       , position = Top
       , textOffset = -1
       , iconOffset = -1
       , lowerOnStart = True
       , pickBroadest = False
       , persistent = False
       , hideOnStart = False
       , iconRoot = "."
       , allDesktops = True
       , overrideRedirect = True
       , commands = [ 
                    Run Date "%H%M hours %Z, %A %B %d 0%Y" "date" 10
                    , Run StdinReader
		    , Run Com "xdotool" ["get_desktop"] "desk" 3
		    ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "%StdinReader%   Desktop %desk% }\
                    \{ It is currently %date%"
       }

CLICK TO VIEW

x

.i3status.conf(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#Only edit this in a UTF-8 environment yada yada, funny German S symbol yada yada yada

general {
        colors = true
        interval = 2
	output_format = "xmobar"
	separator = "    "
}

order += "wireless _first_"
order += "battery all"
order += "disk /" 
order += "disk /home"
order += "volume master"

wireless _first_ {
        format_up = "   Wireless: (%quality at %essid) at address %ip"
        format_down = "  !! Wireless: down"
}

battery all {
        format = "Battery: %status at %percentage, %remaining hours remain"
	status_chr = "Charging"
	status_bat = "Discharging"
	status_unk = "????"
	low_threshold = 20
}

#status_unk is acpi "unknown" status flag. I see this more than I care to admit but my laptop is brand new so it probably doesn't mean anything

disk "/" {
	format = "Root partition %free free;"
}

disk "/home" {
	format = "home partition %free free"
}
#Delete the preceeding section if you don't have separate / and /home partitions. 
#But sweetie you should.

volume master {
	format = " Volume: %volume "
	format_muted = " MUTE "
	device = "default"
	mixer = "Master"
	mixer_idx = 0

}
 

x

Notes

This is just an example of how to configure these programs well, as their defaults are both hideously ugly and xmobar isn’t initially set up to play right with i3status.

Font is from the proggy family available in the Arch Community repo and surely elsewhere.

Dependencies:

  • i3status: generates status text. Has good color output and is decently easy to configure

  • xmobar: status bar, can also generate status text but has fewer options and is optimized to read status from stdin or the output of a program it runs at intervals.

  • xdotool: in this case, we just want the bare output of its “get_desktop” command, but you want to have this on your computer anyways, assuming you use a…

  • EWMH-compliant WM on X11. Otherwise xdotool won’t work and also you’ll experience frustrating behaviors in many other areas.

Commandline in .xinitrc or other startup script: “i3status | xmobar -b &” (Delete the -b if you want it at the top.)

And no, the irony of using an i3 program and an Xmonad program together isn’t lost on me. If they wanted me to use their setup, their setups shouldn’t have looked awful