From 6b622b36d75846709ed1394fc4cb50829829c974 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 15 Oct 2024 15:14:49 +0200 Subject: [PATCH] sway: finally fix idle inhibit the right way --- 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 4d964ab3..f914d934 100644 --- a/modules/graphical/sway/default.nix +++ b/modules/graphical/sway/default.nix @@ -35,6 +35,18 @@ in xdg.portal = { enable = true; + 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"; + }; wlr = { enable = true; settings = {