From 0b5fe07122ea9578f55adef2d7588c87c4d3e9d2 Mon Sep 17 00:00:00 2001 From: Stefan Ellmauthaler Date: Mon, 24 Oct 2022 17:16:28 +0200 Subject: [PATCH] Fix okular issue in wayland Add workaround to use xwayland compat mode instead of the wayland implementation --- modules/graphical.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/graphical.nix b/modules/graphical.nix index 351ae6e..0a04e23 100644 --- a/modules/graphical.nix +++ b/modules/graphical.nix @@ -27,6 +27,16 @@ with lib; { cfg = config.elss.graphical; #cursorsize = if config.variables.hostName == "nucturne" then 14 else 16; #xserverDPI = if config.variables.hostName == "stel-xps" then 180 else null; + + okular-x11 = pkgs.symlinkJoin { + name = "okular"; + paths = [pkgs.okular]; + buildInputs = [pkgs.makeWrapper]; + postBuild = '' + wrapProgram $out/bin/okular \ + --set QT_QPA_PLATFORM xcb + ''; + }; in mkIf cfg.enable { elss.users.x11.enable = @@ -75,7 +85,8 @@ with lib; { environment.systemPackages = with pkgs; [ ungoogled-chromium - okular + # force okular to use xwayland, because of https://github.com/swaywm/sway/issues/4973 + okular-x11 texlive.combined.scheme-full usbutils keepassxc