diff --git a/bin/transmission-add b/bin/transmission-add new file mode 100755 index 0000000..6b434f6 --- /dev/null +++ b/bin/transmission-add @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +address=192.168.50.101 + +set -x + +transmission-remote $address -a "$1" &> /dev/null + +status=$? + +if [ $status -eq 0 ] ; then + notify-send Transmission "Added torrent" +else + notify-send Transmission "Error adding torrent" +fi diff --git a/install.sh b/install.sh index 5b152c0..8e562e0 100755 --- a/install.sh +++ b/install.sh @@ -9,6 +9,8 @@ rm -f $HOME/.config/dunst/dunstrc rm -f $HOME/.config/i3blocks rm -f $HOME/.i3status.conf rm -f $HOME/bin/lock +rm -f $HOME/bin/transmission-add +rm -f $HOME/.local/share/applications/torrent.desktop mkdir -p $HOME/.config/i3 mkdir -p $HOME/.config/dunst @@ -24,6 +26,8 @@ ln -s $(pwd)/i3blocks $HOME/.config/i3blocks ln -s $(pwd)/dunstrc $HOME/.config/dunst/dunstrc ln -s $(pwd)/bin/lock $HOME/bin/lock +ln -s $(pwd)/bin/transmission-add $HOME/bin/transmission-add +ln -s $(pwd)/local/share/applications/torrent.desktop $HOME/.local/share/applications/torrent.desktop # Gnome # dconf load /org/gnome/desktop/ < gnome/desktop.txt diff --git a/local/share/applications/mimeapps.list b/local/share/applications/mimeapps.list new file mode 100755 index 0000000..7989b31 --- /dev/null +++ b/local/share/applications/mimeapps.list @@ -0,0 +1,2 @@ +[Default Applications] +x-scheme-handler/magnet=torrent.desktop; diff --git a/local/share/applications/torrent.desktop b/local/share/applications/torrent.desktop new file mode 100755 index 0000000..71054f9 --- /dev/null +++ b/local/share/applications/torrent.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Transmission +Exec=/usr/bin/env transmission-add %U