diff options
author | Kali Kaneko <kali@leap.se> | 2018-01-22 20:37:30 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2018-01-25 01:19:17 +0100 |
commit | 2d72f6eb4b220c8dfa3c64b2f6b82365791f0424 (patch) | |
tree | 954ff16bb354f36521e7077ff5dbd99ea4d498b4 /src/leap/bitmask/gui/app.py | |
parent | c3306592fbb54fab0da44a8faaa8a1c6954537fd (diff) |
[feat] implement --nowindow flag to display only systray
for some usages, specially with autostart enabled, user might want to
launch only the systray.
this commit implements a simple ``--nowindow`` switch that just avoids
showing the main window for now. in the future, we can have a different
entrypoint that just launches bitmaskd and a minimal systray widget.
I'm not documenting this feature properly since I think this is still
missing some functionality: the ability to switch on and off the vpn,
and the ability to pass the --autostart as a flag to the bitmask
entrypoint.
Diffstat (limited to 'src/leap/bitmask/gui/app.py')
-rw-r--r-- | src/leap/bitmask/gui/app.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py index 2988b15c..4a62adf6 100644 --- a/src/leap/bitmask/gui/app.py +++ b/src/leap/bitmask/gui/app.py @@ -186,7 +186,7 @@ def _handle_kill(*args, **kw): closing = True -def launch_gui(): +def launch_gui(with_window=True): global qApp global bitmaskd global browser @@ -218,7 +218,8 @@ def launch_gui(): timer.timeout.connect(lambda: None) timer.start(500) - browser.show() + if with_window: + browser.show() sys.exit(qApp.exec_()) @@ -250,7 +251,8 @@ def start_app(): return bitmask_cli.main() reset_authtoken() - launch_gui() + with_window = '--nowindow' not in sys.argv + launch_gui(with_window) if __name__ == "__main__": |