diff options
Diffstat (limited to 'bin/status.sh')
| -rwxr-xr-x | bin/status.sh | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/bin/status.sh b/bin/status.sh index 32794ea..aead5aa 100755 --- a/bin/status.sh +++ b/bin/status.sh @@ -2,7 +2,7 @@ set -eu -pulseaudio() { +volume() { volume=$(pactl get-sink-volume @DEFAULT_SINK@ \ | awk 'match($0, /\d+%/) { print substr($0, RSTART, RLENGTH-1) }') if [ "$volume" -eq 0 ]; then @@ -46,11 +46,7 @@ clock() { echo "<span foreground=\"#7dc4e4\"> $(date '+%b %d %H:%M')</span>" } -until [ -e "$XDG_RUNTIME_DIR/somebar-0" ]; do - true -done - -while [ -e "$XDG_RUNTIME_DIR/somebar-0" ]; do - somebar -c status "$(pulseaudio) | $(network) | $(brightness) | $(battery) | $(clock)" || true +while true; do + somebar -c status "$(volume) | $(network) | $(brightness) | $(battery) | $(clock)" || true sleep 0.2 done |
