In case you are wondering how to make portals (i.e. for screensharing) work with qtile.
- You need to import XDG_SESSION_PATH / WAYLAND_DISPLAY from within inside qtile: https://github.com/Mic92/dotfiles/blob/2580420b65b20196b72ab58d4541b2d972dec668/home/.config/qtile/config.py#L487
- This needs to happen before the portal systemd user services are started. I do this by having qtile started in a systemd user service in the
graphical-session-pre.target
: https://github.com/Mic92/dotfiles/blob/2580420b65b20196b72ab58d4541b2d972dec668/nixos/modules/qtile.nix#L117C18-L117C46