From d37db2b64feaa15796a9f6f2a5e019943cebcca0 Mon Sep 17 00:00:00 2001 From: b12f Date: Sat, 26 Oct 2024 22:07:27 +0200 Subject: [PATCH] modules/graphical: fix firefox idle-indicator on wayland --- modules/graphical/sway/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/graphical/sway/default.nix b/modules/graphical/sway/default.nix index abfb452..2bdf376 100644 --- a/modules/graphical/sway/default.nix +++ b/modules/graphical/sway/default.nix @@ -42,6 +42,18 @@ in { }; }; }; + config.sway = { + # https://alex.dandrea.io/2024/07/20/fixing-idle-inhibitor-behaviour-in-firefox-with-wayland/ + # Use xdg-desktop-portal-gtk for every portal interface... + default = "gtk"; + # ... except for the ScreenCast, Screenshot and Secret + "org.freedesktop.impl.portal.ScreenCast" = "wlr"; + "org.freedesktop.impl.portal.Screenshot" = "wlr"; + # ignore inhibit bc gtk portal always returns as success, + # despite sway/the wlr portal not having an implementation, + # stopping firefox from using wayland idle-inhibit + "org.freedesktop.impl.portal.Inhibit" = "none"; + }; extraPortals = with pkgs; [xdg-desktop-portal-gtk]; };