1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

suppress niri toast initially

- matugen will trigger it on startup if auto t heming is enabled
This commit is contained in:
bbedward
2025-09-05 09:07:04 -04:00
parent ba1125bc00
commit 0d6dbf5f99

View File

@@ -28,6 +28,7 @@ Singleton {
property string configValidationOutput: "" property string configValidationOutput: ""
property bool hasInitialConnection: false property bool hasInitialConnection: false
property bool suppressConfigToast: true
readonly property string socketPath: Quickshell.env("NIRI_SOCKET") readonly property string socketPath: Quickshell.env("NIRI_SOCKET")
@@ -344,13 +345,14 @@ Singleton {
if (ToastService.toastVisible && ToastService.currentLevel === ToastService.levelError) { if (ToastService.toastVisible && ToastService.currentLevel === ToastService.levelError) {
ToastService.hideToast() ToastService.hideToast()
} }
if (hasInitialConnection) { if (hasInitialConnection && !suppressConfigToast) {
ToastService.showInfo("niri: config reloaded") ToastService.showInfo("niri: config reloaded")
} }
} }
if (!hasInitialConnection) { if (!hasInitialConnection) {
hasInitialConnection = true hasInitialConnection = true
suppressToastTimer.start()
} }
} }
@@ -555,4 +557,10 @@ Singleton {
return niriMatch && niriMatch.niriWindow.workspace_id === currentWorkspaceId return niriMatch && niriMatch.niriWindow.workspace_id === currentWorkspaceId
}) })
} }
Timer {
id: suppressToastTimer
interval: 3000
onTriggered: suppressConfigToast = false
}
} }