scripts

scripts to make my pc work
Index Commits Files Refs
statusbar/sb-torrent (718B)
   1 #!/bin/sh
   2 
   3 transmission-remote -l | grep % |
   4     sed " # The letters are for sorting and will not appear.
   5     s/.*Stopped.*/A 🛑/;
   6     s/.*Seeding.*/Z 🌱/;
   7     s/.*100%.*/N ✅/;
   8     s/.*Idle.*/B 🕰️/;
   9     s/.*Uploading.*/L ⬆️/;
  10     s/.*%.*/M ⬇️/" |
  11         sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -
  12 
  13 case $BLOCK_BUTTON in
  14     1) setsid -f "$TERMINAL" -e tremc ;;
  15     2) td-toggle ;;
  16     3) notify-send "🌱 Torrent module" "\- Left click to open tremc.
  17 - Middle click to toggle transmission.
  18 - Shift click to edit script.
  19 Module shows number of torrents:
  20 🛑: paused
  21 🕰: idle (seeds needed)
  22 🔼: uploading (unfinished)
  23 🔽: downloading
  24 ✅: done
  25 🌱: done and seeding" ;;
  26     6) "$TERMINAL" -e "$EDITOR" "$0" ;;
  27 esac