Skip to content

Commit 2b12c75

Browse files
committed
Rename MANUAL_MODE to AUTOFILL
1 parent fa9fe33 commit 2b12c75

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lazy-connect.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,22 +105,22 @@ function _lazy_connect() {
105105
esac
106106
fi
107107

108-
[[ "$MANUAL_MODE" -eq "true" ]] && echo -n "$password" | pbcopy
108+
[[ "$AUTOFILL" -eq "true" ]] && echo -n "$password" | pbcopy
109109

110110
osascript <<EOF
111-
on connectVpn(vpnName, password, manual)
111+
on connectVpn(vpnName, password, autofill)
112112
tell application "System Events"
113113
tell process "SystemUIServer"
114114
set vpnMenu to (menu bar item 1 of menu bar 1 where description is "VPN")
115115
tell vpnMenu to click
116116
try
117117
click menu item vpnName of menu 1 of vpnMenu
118118
delay 1
119-
if (manual is not equal to "true")
119+
if (autofill is equal to "true")
120120
keystroke $password
121121
keystroke return
122122
end if
123-
return "true"
123+
return
124124
on error errorStr
125125
if errorStr does not contain "Can’t get menu item" and errorStr does not contain vpnName then
126126
display dialog errorStr
@@ -130,7 +130,7 @@ function _lazy_connect() {
130130
end tell
131131
end connectVpn
132132
133-
connectVpn("$vpn_name", "$password", "$MANUAL_MODE")
133+
connectVpn("$vpn_name", "$password", "$AUTOFILL")
134134
EOF
135135
}
136136

0 commit comments

Comments
 (0)