voidrice/.local/bin/statusbar/sb-torrent

28 lines
726 B
Text
Raw Normal View History

#!/bin/sh
2019-11-23 21:23:24 +00:00
transmission-remote -l | grep % |
2020-09-25 15:41:55 +00:00
sed " # The letters are for sorting and will not appear.
s/.*Stopped.*/A 🛑/;
s/.*Seeding.*/Z 🌱/;
s/.*100%.*/N ✅/;
s/.*Idle.*/B 🕰️/;
s/.*Uploading.*/L ⬆️/;
s/.*%.*/M ⬇️/" |
sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -
2019-11-23 21:23:24 +00:00
case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e stig ;;
2) td-toggle ;;
3) notify-send "🌱 Torrent module" "\- Left click to open stig.
- Middle click to toggle transmission.
- Shift click to edit script.
Module shows number of torrents:
🛑: paused
🕰: idle (seeds needed)
2019-11-23 21:23:24 +00:00
🔼: uploading (unfinished)
🔽: downloading
✅: done
🌱: done and seeding" ;;
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
2019-11-23 21:23:24 +00:00
esac