From 7cb7f10ff6365f87f631b1f15b3a8dcc81f8d6c0 Mon Sep 17 00:00:00 2001 From: thomas Date: Sun, 11 Oct 2026 17:10:21 +0100 Subject: [PATCH] Fix: Only create Sunshine headless output on desktop (no battery) Co-Authored-By: Claude Opus 5.5 --- dotfiles/.config/hypr/core/startup.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles/.config/hypr/core/startup.lua b/dotfiles/.config/hypr/core/startup.lua index e88c22b..de50aca 100644 --- a/dotfiles/.config/hypr/core/startup.lua +++ b/dotfiles/.config/hypr/core/startup.lua @@ -14,8 +14,8 @@ hl.on("hyprland.start", function() 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") - -- Sunshine - hl.exec_cmd("sleep 1 && hyprctl output create headless") + -- 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") -- Polkit (Polkit Gnome / KDE) hl.exec_cmd(scriptsDir .. "/Polkit.sh")