samedami 9d56d3e272
Add 'shelp' script
Also add simple description comment to all script.
2020-05-15 20:56:33 +02:00

34 lines
505 B
Bash
Executable File

#!/bin/sh
# Run dwm bar with modules.
sym="|"
echo "$$" > "$HOME/.cache/dbar.pid"
cd "$HOME/.local/bin/scripts/dwmbar/" || exit 1
status() {
cat << EOF
$(./torrent) $sym
$(./disk) $sym
$(./internet) $sym
$(./lamp) $sym
$(./music) $sym
$(./alsa) $sym
$(./news) $sym
$(./mails) $sym
$(./packages) $sym
$(./date) $sym
$(./clock)
EOF
}
while :; do
[ "$(transmission-remote -l 2>/dev/null | grep %)" ] &&
delay="10s" || delay="1m"
xsetroot -name " $(status | tr '\n' ' ')"
sleep "$delay"
done