bin/nostromo/statusbar
#!/bin/sh get_bat() { bat="$(cat /sys/class/power_supply/BAT1/capacity)" if [ "$bat" -lt 10 ]; then printf '\033[1m\033[31m%s%%\033[0m' "$bat" else printf '%s%%' "$bat" fi } while true do time=$(date +"%A %Y-%m-%d %I:%M %p") time="$time $(date -u +"(%H:%M UTC)")" bat="$(get_bat)" wifi="$(nmcli -t dev show wlp170s0 | grep GENERAL.CONNECTION | cut -d ':' -f 2)" printf "wifi: %s | bat: %s | %s\n" "$wifi" "$bat" "$time" sleep 10 done