File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ function _lazy_connect_init() {
7
7
echo " **********"
8
8
echo $secret_key > $config_dir /secret
9
9
10
- vpnNames= $( osascript << EOF
10
+ osascript << EOF |
11
11
tell application "System Events"
12
12
tell process "SystemUIServer"
13
13
set vpnMenu to (menu bar item 1 of menu bar 1 where description is "VPN")
@@ -27,8 +27,8 @@ function _lazy_connect_init() {
27
27
end tell
28
28
end tell
29
29
EOF
30
- )
31
- echo $vpnNames | sed -e " s/Connect //g; s/Disconnect //g; " | tr , " \n " | xargs -I{} echo {} > $config_dir /vpns
30
+ tr , ' \n ' | sed ' s/ Connect/Connect/g ' > $config_dir /vpns
31
+
32
32
echo " VPN List:"
33
33
cat $config_dir /vpns | nl
34
34
}
@@ -60,7 +60,7 @@ function _lazy_connect() {
60
60
set vpnMenu to (menu bar item 1 of menu bar 1 where description is "VPN")
61
61
tell vpnMenu to click
62
62
try
63
- click menu item ("Connect " & vpnName) of menu 1 of vpnMenu
63
+ click menu item vpnName of menu 1 of vpnMenu
64
64
delay 1
65
65
keystroke password
66
66
keystroke return
You can’t perform that action at this time.
0 commit comments