summaryrefslogtreecommitdiff
path: root/.local/bin/scripts/transopen
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/scripts/transopen')
-rwxr-xr-x.local/bin/scripts/transopen20
1 files changed, 20 insertions, 0 deletions
diff --git a/.local/bin/scripts/transopen b/.local/bin/scripts/transopen
new file mode 100755
index 0000000..3897ef0
--- /dev/null
+++ b/.local/bin/scripts/transopen
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Possible servers
+hosts="raspberry
+localhost"
+
+if [ -z "$1" ]; then
+ host=$(printf "$hosts" | fzf +m --reverse)
+else
+ host="$1"
+fi
+
+case $host in
+ localhost) tremc -c localhost ;;
+ raspberry)
+ host=$(pass Services/transmission/rpi-host)
+ creds=$(pass Services/transmission/rpi-creds)
+ tremc -c "$creds@$host" ;;
+esac
+