1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 06:52:50 -05:00

Feat/niri workspace names (#1396)

* dankbar: show niri workspace names

Keep labels aligned with niri indices and live renames.

* dankbar: prefix named workspaces with index

Use workspace index toggle to show index: name labels.

* workspaces: change size conditions for workspace names

---------

Co-authored-by: bbedward <bbedward@gmail.com>
This commit is contained in:
Kamil Chmielewski
2026-01-21 16:43:55 +01:00
committed by GitHub
parent 417bf37515
commit fd2c6a0784
3 changed files with 161 additions and 56 deletions

View File

@@ -49,7 +49,7 @@ Singleton {
function setWorkspaces(newMap) {
root.workspaces = newMap;
allWorkspaces = Object.values(newMap).sort((a, b) => a.idx - b.idx);
root.allWorkspaces = Object.values(newMap).sort((a, b) => a.idx - b.idx);
}
Component.onCompleted: fetchOutputs()
@@ -863,9 +863,13 @@ Singleton {
return currentOutputWorkspaces.map(w => w.idx + 1);
}
function getCurrentOutputWorkspaces() {
return currentOutputWorkspaces.slice();
}
function getCurrentWorkspaceNumber() {
if (focusedWorkspaceIndex >= 0 && focusedWorkspaceIndex < allWorkspaces.length) {
return allWorkspaces[focusedWorkspaceIndex].idx + 1;
return allWorkspaces[focusedWorkspaceIndex].idx;
}
return 1;
}