dmenu-scripts/dmenu-transmission

13 lines
338 B
Plaintext
Raw Normal View History

#!/bin/sh
id=$(transmission-remote -l | dmenu -l 10 | awk '{print $1}'| sed 's/*//')
[ -z "$id" ] && exit 0
case "$(printf "Start\\nStop\\nRemove" | dmenu -p "Torrent Action: ")" in
Remove) transmission-remote -t $id -r ;;
Start) transmission-remote -t $id -s ;;
Stop) transmission-remote -t $id -S ;;
*) exit ;;
esac