Configuring Openbox with lemonbar and xterm on Void Linux

Installing everything

xbps-install -S openbox lemonbar xterm

Openbox works oob with default login manager, no need to configure

Configuring xterm

xterm by default looks for ~/.Xdefaults on Void Linux. If not, check by strace -o xterm.log xterm and find openat() call with /home/*/.X* in it.

XTerm*locale: true
XTerm*metaSendsEscape: true
XTerm*selectToClipboard: true
XTerm*saveLines: 4096
XTerm*scrollBar: true
XTerm*scrollbar.width: 8
XTerm*reverseVideo: true


Configuring lemonbar

lemonbar needs data piped into it, so I created two scripts. One to start lemonbar with openbox, and second to show battery status and date on lemonbar

[d3s@kekbook ~]$ cat .config/openbox/autostart
exec /home/d3s/

[d3s@kekbook ~]$ cat 
/home/d3s/ | lemonbar -p

[d3s@kekbook ~]$ cat

Clock() {
        DATETIME=$(date "+%a %b %d, %T")
        echo -n "$DATETIME"

Battery() {
        BATPERC=$(acpi --battery | cut -d, -f2)
        echo "$BATPERC"

while true; do
        echo "$(Battery) | $(Clock)"
        sleep 1