Watch
1
0
Fork
You've already forked souveraine
0

shell: place AirPods card without Hyprland

This commit is contained in:
Fimeg 2026-08-13 17:46:49 -04:00
commit 86234b08ba

View file

@ -19,8 +19,13 @@ Scope {
readonly property bool canShow: AccessoryPresentation.generation > dismissedGeneration
&& GlobalStates.displayActive
&& !GlobalStates.screenLockSecure
readonly property var focusedScreen: Quickshell.screens.find(
screen => screen.name === Hyprland.focusedMonitor?.name) ?? null
// Preserve the focused desktop output under Hyprland. Membrane does not
// publish a selected-output fact yet; on its one-panel device, choosing
// Quickshell's first announced screen is the truthful fallback. Returning
// no screen here creates no PanelWindow at all.
readonly property var presentationScreen: Quickshell.screens.find(
screen => screen.name === Hyprland.focusedMonitor?.name)
?? (Quickshell.screens.length > 0 ? Quickshell.screens[0] : null)
Connections {
target: AccessoryPresentation
@ -40,7 +45,7 @@ Scope {
}
Variants {
model: scope.focusedScreen ? [scope.focusedScreen] : []
model: scope.presentationScreen ? [scope.presentationScreen] : []
PanelWindow {
id: win