forked from mattfoster/zshkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
05_vpn
26 lines (23 loc) · 747 Bytes
/
05_vpn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Some simple functions to control Viscosity
if [[ -x '/Applications/Viscosity.app' || -x "$HOME/Viscosity.app" ]]; then
function vpnc {
CONN=$1
osascript -e 'on run argv
tell Application "Viscosity" to activate
tell Application "Viscosity" to connect item 1 of argv
end run' $CONN
}
function vpnca {
osascript -e 'tell application "Viscosity" to activate
tell Application "Viscosity" to connectall'
}
function vpnd {
CONN=$1
osascript -e 'on run argv
tell Application "Viscosity" to disconnect item 1 of argv
end run' $CONN
}
function vpnda {
osascript -e 'tell Application "Viscosity" to disconnectall'
}
fi