commit cb5834b54bb6e590ae1b7400e84fdd0aad724dac parent 19623c874123f286f0bf084e40e93fd386a4569f Author: Luke Smith <luke@lukesmith.xyz> Date: Thu, 4 Oct 2018 13:45:00 -0400 transadd script added Diffstat:
A | .scripts/transadd | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/.scripts/transadd b/.scripts/transadd @@ -0,0 +1,12 @@ +#!/bin/sh + +# Mimeapp script for adding torrent to transmission-daemon, but will also start +# the daemon first if not running. + +# Optionally requires my `note` script. The sleep of 3 seconds is because the +# transmission-daemon sometimes fails to take remote requests in its first +# moments. + +pgrep -x transmission-da || (transmission-daemon && note "Starting daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks) + +transmission-remote -a "$@" && note "Torrent added."