diff --git a/bin/bar b/bin/bar new file mode 100755 index 0000000..933cdef --- /dev/null +++ b/bin/bar @@ -0,0 +1,159 @@ +#!/bin/ksh + +red="%{F#cd0000}" +yellow="%{F#cdcd00}" +black="%{F#000000}" + +wifi_ssid=$(cat < 0) { printf $1 } else { printf "0" }}' + count=$((count+1)) + if [ $count -ne ${#mail_list[@]} ]; then + echo -n "," + fi + done +} + +vmm() { + if pgrep -q vmd; then + set -A running_vms $(vmctl status | grep running | awk '{print $NF"("$5")"}') + echo -n "VMs: " + for vm in "${running_vms[@]}"; do + echo -n "${vm} " + done + else + echo -n "" + fi +} + +printf "%%{l} %s | %s | %%{A:apm -A:}%%{A2:apm -L:}%%{A3:apm -H:}%s%%{A}%%{A}%%{A} | %s %%{r} %s | %s | %s | %s | @%s " \ + "$(battery)" "$(temp)" "$(hz)" "$(mem)" \ + "$(vmm)" "$(mail)" "$(wifi)" "$(date '+%Y-%m-%d %H:%M')" "$(beat)"