Krolyxon
Commit a2b62c9

Branches

Refs →

aurora.localbintransadd

14 lines · 509 B · Bourne Again Shell (bash)

1#!/bin/sh
2
3# Starting transmission-daemon if not already running
4# transmission-daemon sometimes fails to take remote requests in its first moments, hence the sleep.
5pidof transmission-daemon >/dev/null || (transmission-daemon && notify-send "Starting transmission daemon...")
6sleep 3
7
8# adding the Torrent
9if [ -z "$*" ]; then
10 magnetlink="$(wl-paste)"
11 transmission-remote -a "$magnetlink" && notify-send "🔽 Torrent added."
12else
13 transmission-remote -a "$@" && notify-send "🔽 Torrent added."
14fi