transadd (456B)
1 #!/bin/sh 2 3 # Mimeapp script for adding torrent to transmission-daemon, but will also start the daemon first if not running. 4 5 # transmission-daemon sometimes fails to take remote requests in its first moments, hence the sleep. 6 7 pidof transmission-daemon >/dev/null || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-waybar}") 8 9 transmission-remote -a "$@" && notify-send "🔽 Torrent added."