diff options
Diffstat (limited to '.local/bin/dwmbar/dwmb-torrents')
-rwxr-xr-x | .local/bin/dwmbar/dwmb-torrents | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.local/bin/dwmbar/dwmb-torrents b/.local/bin/dwmbar/dwmb-torrents new file mode 100755 index 0000000..11c0792 --- /dev/null +++ b/.local/bin/dwmbar/dwmb-torrents @@ -0,0 +1,18 @@ +#!/bin/sh + +status="$(btcli list -aif "%t\n" )" + +starting="$( echo "$status" | grep -c "+" - )" +stopping="$( echo "$status" | grep -c "-" - )" +innactive="$(echo "$status" | grep -c "I" - )" +seeding="$( echo "$status" | grep -c "S" - )" +leeching="$( echo "$status" | grep -c "L" - )" + +# [ "$starting" == "0" ] || echo "Starting: $starting" +# [ "$stopping" == "0" ] || echo "Stopping: $stopping" +[ "$innactive" == "0" ] || echo "Innactive: $innactive" +[ "$seeding" == "0" ] || seed=" $seeding" +[ "$leeching" == "0" ] || down=" $leeching" + +echo "$down $seed" + |