summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r--src/leap/bitmask/gui/app.py32
1 files changed, 25 insertions, 7 deletions
diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py
index 4a62adf6..d52636c2 100644
--- a/src/leap/bitmask/gui/app.py
+++ b/src/leap/bitmask/gui/app.py
@@ -223,6 +223,19 @@ def launch_gui(with_window=True):
sys.exit(qApp.exec_())
+usage = '''bitmask [<args>]
+
+Launches the Bitmask GUI.
+
+OPTIONAL ARGUMENTS:
+
+ --nowindow does not launch the main window, only the systray.
+
+SEE ALSO:
+
+ bitmaskctl controls bitmask daemon from the command line.
+'''
+
def start_app():
from leap.bitmask.util import STANDALONE
@@ -242,13 +255,18 @@ def start_app():
MIN_ARGS = 1
# DEBUG ====================================
- if STANDALONE and len(sys.argv) > MIN_ARGS:
- if sys.argv[1] == 'bitmask_helpers':
- from leap.bitmask.vpn.helpers import main
- return main()
-
- from leap.bitmask.cli import bitmask_cli
- return bitmask_cli.main()
+ if len(sys.argv) > MIN_ARGS:
+ if STANDALONE:
+ if sys.argv[1] == 'bitmask_helpers':
+ from leap.bitmask.vpn.helpers import main
+ return main()
+
+ from leap.bitmask.cli import bitmask_cli
+ return bitmask_cli.main()
+ else:
+ if sys.argv[1] == '--help' or sys.argv[1] == 'help':
+ print(usage)
+ sys.exit()
reset_authtoken()
with_window = '--nowindow' not in sys.argv