32 lines
477 B
Plaintext
Raw Normal View History

2020-05-09 21:26:23 +02:00
#!/bin/sh
sym="|"
2020-05-14 12:29:22 +02:00
echo "$$" > "$HOME/.cache/dbar.pid"
2020-05-09 21:26:23 +02:00
cd "$HOME/.local/bin/scripts/dwmbar/" || exit 1
status() {
2020-05-14 10:45:21 +02:00
cat << EOF
$(./torrent) $sym
2020-05-14 10:45:21 +02:00
$(./disk) $sym
$(./internet) $sym
$(./lamp) $sym
$(./music) $sym
$(./alsa) $sym
2020-05-14 13:24:16 +02:00
$(./news) $sym
2020-05-14 10:45:21 +02:00
$(./mails) $sym
$(./packages) $sym
$(./date) $sym
$(./clock)
EOF
2020-05-09 21:26:23 +02:00
}
while :; do
2020-05-15 10:58:05 +02:00
[ "$(transmission-remote -l 2>/dev/null | grep %)" ] &&
delay="10s" || delay="1m"
2020-05-14 10:45:21 +02:00
xsetroot -name " $(status | tr '\n' ' ')"
2020-05-09 21:26:23 +02:00
2020-05-13 15:07:01 +02:00
sleep "$delay"
2020-05-09 21:26:23 +02:00
done