7c798c005c
GamemodePill is instantiated per screen Variant, so it spawned one long-lived gdbus monitor per monitor (3 on desktop). Move the watcher into a shared Gamemode singleton so only one runs regardless of screen count.
26 lines
691 B
QML
26 lines
691 B
QML
import Quickshell
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import "../shared" as Shared
|
|
|
|
// Gamemode indicator — visible only when gamemode is active.
|
|
// State comes from the shared Gamemode singleton (one gdbus monitor for all
|
|
// screens), not a per-pill process.
|
|
BarPill {
|
|
id: root
|
|
|
|
groupName: "" // no popout
|
|
accentColor: Shared.Theme.green
|
|
visible: Shared.Gamemode.active
|
|
|
|
content: [
|
|
Text {
|
|
Layout.alignment: Qt.AlignHCenter
|
|
text: "\u{f0522}" // nf-md-controller_classic
|
|
color: Shared.Theme.green
|
|
font.pixelSize: Shared.Theme.fontLarge
|
|
font.family: Shared.Theme.iconFont
|
|
}
|
|
]
|
|
}
|