Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Commit

Permalink
changed autoconnect start screen to show status.
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusmatticus committed Feb 11, 2021
1 parent 4c78236 commit 415b525
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Binary file modified MullvadVPN.alfredworkflow
Binary file not shown.
19 changes: 12 additions & 7 deletions src/mullvad.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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'],
Expand All @@ -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()
Expand Down
Binary file modified src/mullvad.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion src/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.1
0.10.2

0 comments on commit 415b525

Please sign in to comment.