diff --git a/MullvadVPN.alfredworkflow b/MullvadVPN.alfredworkflow index 23966a3..bb27a11 100644 Binary files a/MullvadVPN.alfredworkflow and b/MullvadVPN.alfredworkflow differ diff --git a/src/mullvad.py b/src/mullvad.py index 927e7d1..b1bec43 100644 --- a/src/mullvad.py +++ b/src/mullvad.py @@ -222,6 +222,15 @@ def filter_tunnel_protocols(query): return protocols +def set_auto_connect(): + for status in get_auto_connect(): + wf.add_item(status, + 'Current auto-connect status.', + arg='/usr/local/bin/mullvad auto-connect get', + valid=True, + icon='icons/chevron-right-dark.png') + + def set_lan(): for status in get_lan(): if status == 'Local network sharing setting: allow': @@ -420,8 +429,9 @@ def main(wf): protocol_status() set_lan() check_connection() + set_auto_connect() for action in mullvad_actions.ACTIONS: - if action['name'] in ['relay', 'reconnect', 'auto-connect', 'account']: + if action['name'] in ['relay', 'reconnect', 'account']: wf.add_item(action['name'], action['description'], uid=action['name'], autocomplete=action['autocomplete'], @@ -445,12 +455,7 @@ def main(wf): set_lan() elif query and query.startswith('auto-connect'): - for status in get_auto_connect(): - wf.add_item(status, - 'Current auto-connect status.', - arg='/usr/local/bin/mullvad auto-connect get', - valid=True, - icon='icons/chevron-right-dark.png') + set_auto_connect() elif query and query.startswith('reconnect'): set_reconnect() diff --git a/src/mullvad.pyc b/src/mullvad.pyc index a06d5ec..af31b5a 100644 Binary files a/src/mullvad.pyc and b/src/mullvad.pyc differ diff --git a/src/version b/src/version index 5712157..5eef0f1 100644 --- a/src/version +++ b/src/version @@ -1 +1 @@ -0.10.1 +0.10.2