mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-27 15:02:50 -05:00
Handle urgent workspaces
This commit is contained in:
@@ -23,6 +23,8 @@ Singleton {
|
||||
|
||||
property var windows: []
|
||||
|
||||
signal windowUrgentChanged()
|
||||
|
||||
property bool inOverview: false
|
||||
|
||||
property int currentKeyboardLayoutIndex: 0
|
||||
@@ -189,6 +191,9 @@ Singleton {
|
||||
case 'KeyboardLayoutSwitched':
|
||||
handleKeyboardLayoutSwitched(event.KeyboardLayoutSwitched);
|
||||
break;
|
||||
case 'WorkspaceUrgencyChanged':
|
||||
handleWorkspaceUrgencyChanged(event.WorkspaceUrgencyChanged);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,6 +378,22 @@ Singleton {
|
||||
currentKeyboardLayoutIndex = data.idx
|
||||
}
|
||||
|
||||
function handleWorkspaceUrgencyChanged(data) {
|
||||
const ws = root.workspaces[data.id]
|
||||
if (!ws) {
|
||||
return
|
||||
}
|
||||
|
||||
ws.is_urgent = data.urgent
|
||||
|
||||
const idx = allWorkspaces.findIndex(w => w.id === data.id)
|
||||
if (idx >= 0) {
|
||||
allWorkspaces[idx].is_urgent = data.urgent
|
||||
}
|
||||
|
||||
windowUrgentChanged()
|
||||
}
|
||||
|
||||
Process {
|
||||
id: validateProcess
|
||||
command: ["niri", "validate"]
|
||||
|
||||
Reference in New Issue
Block a user