shell: place AirPods card without Hyprland
This commit is contained in:
parent
a353f1d665
commit
86234b08ba
1 changed files with 8 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue