From 9a038b74c393379130be4e2432d9b3f7166025b3 Mon Sep 17 00:00:00 2001 From: thomas Date: Sat, 17 Oct 2026 22:23:41 +0100 Subject: [PATCH] Fix: Restart portals after env import so screen sharing works xdg-desktop-portal-hyprland could start before Hyprland imported WAYLAND_DISPLAY/XDG_CURRENT_DESKTOP, leaving no ScreenCast backend. Co-Authored-By: Claude Opus 5.5 --- dotfiles/.config/hypr/core/startup.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotfiles/.config/hypr/core/startup.lua b/dotfiles/.config/hypr/core/startup.lua index 0d648c5..4e744f1 100644 --- a/dotfiles/.config/hypr/core/startup.lua +++ b/dotfiles/.config/hypr/core/startup.lua @@ -13,6 +13,8 @@ hl.on("hyprland.start", function() -- Startup hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP") hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP") + -- restart portals once the env is imported, otherwise screen sharing breaks + hl.exec_cmd("sleep 1 && systemctl --user restart xdg-desktop-portal-hyprland && systemctl --user restart xdg-desktop-portal") -- Sunshine (virtual monitor only on desktop; skipped on laptops, detected by a system battery) hl.exec_cmd("sleep 1 && ! ls -d /sys/class/power_supply/BAT* >/dev/null 2>&1 && hyprctl output create headless")