Skip to content

Commit

Permalink
nixos/sway: workaround idle inhibit not working in Firefox (#348792)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRTitor authored Oct 24, 2024
2 parents e960bc8 + 7e7a069 commit c87f82b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion nixos/modules/programs/wayland/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,19 @@ in
services.displayManager.sessionPackages = lib.optional (cfg.package != null) cfg.package;

# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050913
xdg.portal.config.sway.default = lib.mkDefault [ "wlr" "gtk" ];
# https://github.com/emersion/xdg-desktop-portal-wlr/blob/master/contrib/wlroots-portals.conf
# https://github.com/emersion/xdg-desktop-portal-wlr/pull/315
xdg.portal.config.sway = {
# 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";
};
}

(import ./wayland-session.nix {
Expand Down

0 comments on commit c87f82b

Please sign in to comment.