diff --git a/qutebrowser/app.py b/qutebrowser/app.py index ff7678f4c..4fa8909e1 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -163,7 +163,8 @@ class Application(QApplication): self.modeman.enter(KeyMode.normal, 'init') log.init.debug("Showing mainwindow...") - self.mainwindow.show() + if not args.nowindow: + self.mainwindow.show() log.init.debug("Applying python hacks...") self._python_hacks() timer = QTimer.singleShot(0, self._process_init_args) diff --git a/qutebrowser/qutebrowser.py b/qutebrowser/qutebrowser.py index ea6c256aa..152d7c54d 100644 --- a/qutebrowser/qutebrowser.py +++ b/qutebrowser/qutebrowser.py @@ -64,6 +64,8 @@ def get_argparser(): debug.add_argument('--harfbuzz', choices=['old', 'new', 'system', 'auto'], default='auto', help="HarfBuzz engine version to use. " "Default: auto.") + debug.add_argument('--nowindow', action='store_true', help="Don't show " + "the main window.") # For the Qt args, we use store_const with const=True rather than # store_true because we want the default to be None, to make # utils.qt:get_qt_args easier.