mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
feat(workspace): optionally group app icons on the active workspace
Closes #1208
This commit is contained in:
@@ -340,7 +340,8 @@ Item {
|
||||
|
||||
const keyBase = (w.app_id || w.appId || w.class || w.windowClass || "unknown");
|
||||
const moddedId = Paths.moddedAppId(keyBase);
|
||||
const key = isActiveWs || !SettingsData.groupWorkspaceApps ? `${moddedId}_${i}` : moddedId;
|
||||
const groupThisWs = SettingsData.groupWorkspaceApps && (!isActiveWs || SettingsData.groupActiveWorkspaceApps);
|
||||
const key = groupThisWs ? moddedId : `${moddedId}_${i}`;
|
||||
|
||||
if (!byApp[key]) {
|
||||
const isQuickshell = keyBase === "org.quickshell" || keyBase === "com.danklinux.dms";
|
||||
@@ -1091,7 +1092,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
return (SettingsData.groupWorkspaceApps && !isActive) ? groupedCount : totalCount;
|
||||
return (SettingsData.groupWorkspaceApps && (!isActive || SettingsData.groupActiveWorkspaceApps)) ? groupedCount : totalCount;
|
||||
}
|
||||
|
||||
readonly property real baseWidth: root.isVertical ? (SettingsData.showWorkspaceApps ? Math.max(widgetHeight * 0.7, root.appIconSize + Theme.spacingXS * 2) : widgetHeight * 0.5) : (isActive ? Math.max(root.widgetHeight * 1.05, root.appIconSize * 1.6) : Math.max(root.widgetHeight * 0.7, root.appIconSize * 1.2))
|
||||
@@ -1883,6 +1884,12 @@ Item {
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: root
|
||||
function onCurrentWorkspaceChanged() {
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: NiriService
|
||||
enabled: CompositorService.isNiri
|
||||
@@ -1907,6 +1914,12 @@ Item {
|
||||
function onAppIdSubstitutionsChanged() {
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
function onGroupWorkspaceAppsChanged() {
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
function onGroupActiveWorkspaceAppsChanged() {
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: DwlService
|
||||
|
||||
Reference in New Issue
Block a user