summaryrefslogtreecommitdiff
path: root/.local/bin/scripts/transopen
blob: 3897ef05790d3affadda91f70600ac7cef2f0248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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