feat: auto-disable niri-dependent components when NIRI_SOCKET is absent
This commit is contained in:
parent
dd854a2f7f
commit
9cf6853742
4 changed files with 9 additions and 5 deletions
|
|
@ -11,12 +11,14 @@ QtObject {
|
|||
signal windowFocusChanged(var windowId)
|
||||
signal windowOpenedOrChanged(var window)
|
||||
|
||||
readonly property bool available: Quickshell.env("NIRI_SOCKET") !== ""
|
||||
|
||||
property string focusedTitle: ""
|
||||
property string focusedAppId: ""
|
||||
property bool overviewOpen: false
|
||||
|
||||
property var _focusedProc: Process {
|
||||
running: true
|
||||
running: root.available
|
||||
command: ["niri", "msg", "--json", "focused-window"]
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
|
|
@ -35,7 +37,7 @@ QtObject {
|
|||
}
|
||||
|
||||
property var _eventStream: Process {
|
||||
running: true
|
||||
running: root.available
|
||||
command: ["niri", "msg", "--json", "event-stream"]
|
||||
stdout: SplitParser {
|
||||
splitMarker: "\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue