From 1a013814aaf4c1d07bd7c7351e015f3be867824f Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Mon, 1 Aug 2022 17:52:30 +0200 Subject: [PATCH] simple transmission remote controling script. --- dmenu-transmission | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 dmenu-transmission 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