dotfiles-x11.localbintransadd
| 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...") |
| 8 | sleep 3 |
| 9 | transmission-remote -a "$@" && notify-send "🔽 Torrent added." |