sway/xdg-desktop-portals: fix moby so app chooser is provided by gnome portal, even as the requirements for camera access are provided by gtk

This commit is contained in:
2024-12-05 00:52:58 +00:00
parent a8810d336c
commit 78ec98301e

View File

@@ -208,7 +208,9 @@ in
# - org.freedesktop.impl.portal.Settings (@settings_iface@)
# - org.freedesktop.impl.portal.Wallpaper (@wallpaper_iface@)
"xdg-desktop-portal-gtk"
# xdg-desktop-portal-wlr provides portals for screenshots/screen sharing
# xdg-desktop-portal-wlr provides portals for:
# - org.freedesktop.impl.portal.ScreenCast
# - org.freedesktop.impl.portal.Screenshot
"xdg-desktop-portal-wlr"
"xdg-terminal-exec" # used by sway config
] ++ [
@@ -244,12 +246,22 @@ in
fs.".config/xdg-desktop-portal/sway-portals.conf".symlink.text = ''
# portals.conf docs: <https://flatpak.github.io/xdg-desktop-portal/docs/portals.conf.html>
# XXX(2024-11-28): `gnome` provides a more mobile-friendly file chooser than `gtk`,
# only `gtk` provides Snapshot camera app with a permission's popup that allows me to grant it camera access.
# TODO: switch back to `wlr;gnome;gtk` ordering (or even `wlr;gnome`), but remove from `gnome` whatever boken portal is involved with that camera access.
#
# $interface=<impl list>
# impl_list=(gtk|gnome|wlr|*|none)
# where `none` means "don't provide an impl for this interface"
# where `*` means use the first impl found, in lexicographic order
#
# special interface name `default` is used as a catchall for any interface not listed explicitly
[preferred]
default=wlr;gtk
# default=wlr;gnome;gtk
default=wlr;gtk;gnome
# Access portal: "An application wants to [...] Deny Access / Grant Access"
# XXX(2024-12-04): gnome Access portal simply doesn't render on non-Gnome DEs
org.freedesktop.impl.portal.Access=gtk
# XXX(2024-12-04): the gnome file-chooser (libadwaita) is much more mobile-friendly than the gtk ones
org.freedesktop.impl.portal.FileChooser=gnome
'';
fs.".config/sway/config".symlink.target = pkgs.substituteAll {