diff --git a/dmenu-transmission b/dmenu-transmission new file mode 100755 index 0000000..28e7110 --- /dev/null +++ b/dmenu-transmission @@ -0,0 +1,12 @@ +#!/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