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() {
77 echo " **********"
88 echo $secret_key > $config_dir /secret
99
10- vpnNames= $( osascript << EOF
10+ osascript << EOF |
1111 tell application "System Events"
1212 tell process "SystemUIServer"
1313 set vpnMenu to (menu bar item 1 of menu bar 1 where description is "VPN")
@@ -27,8 +27,8 @@ function _lazy_connect_init() {
2727 end tell
2828 end tell
2929EOF
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+
3232 echo " VPN List:"
3333 cat $config_dir /vpns | nl
3434}
@@ -60,7 +60,7 @@ function _lazy_connect() {
6060 set vpnMenu to (menu bar item 1 of menu bar 1 where description is "VPN")
6161 tell vpnMenu to click
6262 try
63- click menu item ("Connect " & vpnName) of menu 1 of vpnMenu
63+ click menu item vpnName of menu 1 of vpnMenu
6464 delay 1
6565 keystroke password
6666 keystroke return
You can’t perform that action at this time.
0 commit comments