diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 7a9c01d33..e50e2971d 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -47,6 +47,7 @@ |<>|The format to use for the window title. The following placeholders are defined: |<>|Whether to hide the mouse cursor. |<>|Use standard JavaScript modal dialog for alert() and confirm() +|<>|Hide the window decoration when using wayland (requires restart) |============== .Quick reference for section ``network'' @@ -631,6 +632,17 @@ Valid values: Default: +pass:[false]+ +[[ui-hide-wayland-decoration]] +=== hide-wayland-decoration +Hide the window decoration when using wayland (requires restart) + +Valid values: + + * +true+ + * +false+ + +Default: +pass:[false]+ + == network Settings related to the network. diff --git a/qutebrowser/app.py b/qutebrowser/app.py index b5523fb1a..64a116fc2 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -418,6 +418,10 @@ def _init_modules(args, crash_handler): log.init.debug("Initializing completions...") completionmodels.init() log.init.debug("Misc initialization...") + if config.get('ui', 'hide-wayland-decoration'): + os.environ['QT_WAYLAND_DISABLE_WINDOWDECORATION'] = '1' + else: + os.environ.pop('QT_WAYLAND_DISABLE_WINDOWDECORATION', None) _maybe_hide_mouse_cursor() objreg.get('config').changed.connect(_maybe_hide_mouse_cursor) diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 6190b1800..53c95bdea 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -318,6 +318,11 @@ def data(readonly=False): SettingValue(typ.Bool(), 'false'), "Use standard JavaScript modal dialog for alert() and confirm()"), + ('hide-wayland-decoration', + SettingValue(typ.Bool(), 'false'), + "Hide the window decoration when using wayland " + "(requires restart)"), + readonly=readonly )),