summaryrefslogtreecommitdiff
path: root/bin/status.sh
diff options
context:
space:
mode:
authorSam Nystrom <sam@samnystrom.dev>2023-04-16 15:40:39 -0500
committerSam Nystrom <sam@samnystrom.dev>2023-04-16 15:40:39 -0500
commit205a7a03bf449924a667e39616aeca4f13faf865 (patch)
tree872803eadf1b896f680c1c9b9e73640759e1635a /bin/status.sh
parent572640d0d06ece1e2c5556dea2ee2227e5816a23 (diff)
fix(bin): remove test for somebar FIFO in status
Now that status.sh is managed with superd, we don't have to worry about making sure the script exits after somebar does.
Diffstat (limited to 'bin/status.sh')
-rwxr-xr-xbin/status.sh10
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