1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

feat: Add group workspace apps toggle (#1238)

* Add group workspace apps toggle

* wording

* fix pre-commit

---------

Co-authored-by: bbedward <bbedward@gmail.com>
This commit is contained in:
vha
2026-01-02 21:55:51 +01:00
committed by GitHub
parent d2c4391514
commit 7268a3fe7f
5 changed files with 46 additions and 3 deletions

View File

@@ -175,6 +175,7 @@ Singleton {
property bool showWorkspacePadding: false property bool showWorkspacePadding: false
property bool workspaceScrolling: false property bool workspaceScrolling: false
property bool showWorkspaceApps: false property bool showWorkspaceApps: false
property bool groupWorkspaceApps: true
property int maxWorkspaceIcons: 3 property int maxWorkspaceIcons: 3
property bool workspacesPerMonitor: true property bool workspacesPerMonitor: true
property bool showOccupiedWorkspacesOnly: false property bool showOccupiedWorkspacesOnly: false

View File

@@ -86,6 +86,7 @@ var SPEC = {
workspaceScrolling: { def: false }, workspaceScrolling: { def: false },
showWorkspaceApps: { def: false }, showWorkspaceApps: { def: false },
maxWorkspaceIcons: { def: 3 }, maxWorkspaceIcons: { def: 3 },
groupWorkspaceApps: { def: true },
workspacesPerMonitor: { def: true }, workspacesPerMonitor: { def: true },
showOccupiedWorkspacesOnly: { def: false }, showOccupiedWorkspacesOnly: { def: false },
reverseScrolling: { def: false }, reverseScrolling: { def: false },

View File

@@ -241,7 +241,7 @@ Item {
} }
const keyBase = (w.app_id || w.appId || w.class || w.windowClass || "unknown"); const keyBase = (w.app_id || w.appId || w.class || w.windowClass || "unknown");
const key = isActiveWs ? `${keyBase}_${i}` : keyBase; const key = isActiveWs || !SettingsData.groupWorkspaceApps ? `${keyBase}_${i}` : keyBase;
if (!byApp[key]) { if (!byApp[key]) {
const moddedId = Paths.moddedAppId(keyBase); const moddedId = Paths.moddedAppId(keyBase);

View File

@@ -103,6 +103,16 @@ Item {
} }
} }
SettingsToggleRow {
settingKey: "groupWorkspaceApps"
tags: ["workspace", "apps", "icons", "group", "grouped", "collapse"]
text: I18n.tr("Group Workspace Apps")
description: I18n.tr("Group repeated application icons in unfocused workspaces")
checked: SettingsData.groupWorkspaceApps
visible: SettingsData.showWorkspaceApps
onToggled: checked => SettingsData.set("groupWorkspaceApps", checked)
}
SettingsToggleRow { SettingsToggleRow {
settingKey: "workspacesPerMonitor" settingKey: "workspacesPerMonitor"
tags: ["workspace", "per-monitor", "multi-monitor"] tags: ["workspace", "per-monitor", "multi-monitor"]

View File

@@ -708,6 +708,31 @@
], ],
"icon": "visibility_off" "icon": "visibility_off"
}, },
{
"section": "groupWorkspaceApps",
"label": "Group Workspace Apps",
"tabIndex": 4,
"category": "Workspaces",
"keywords": [
"app",
"application",
"apps",
"collapse",
"desktop",
"group",
"grouped",
"icons",
"program",
"repeated",
"same",
"spaces",
"virtual",
"virtual desktops",
"workspace",
"workspaces"
],
"description": "Group repeated application icons in the same workspace"
},
{ {
"section": "workspaceIcons", "section": "workspaceIcons",
"label": "Named Workspace Icons", "label": "Named Workspace Icons",
@@ -873,19 +898,25 @@
}, },
{ {
"section": "showWorkspaceName", "section": "showWorkspaceName",
"label": "Workspace Name", "label": "Workspace Names",
"tabIndex": 4, "tabIndex": 4,
"category": "Workspaces", "category": "Workspaces",
"keywords": [ "keywords": [
"bars",
"desktop", "desktop",
"first",
"horizontal",
"labels", "labels",
"letter",
"name",
"names",
"panel", "panel",
"show", "show",
"spaces", "spaces",
"statusbar", "statusbar",
"switcher",
"taskbar", "taskbar",
"topbar", "topbar",
"vertical",
"virtual", "virtual",
"virtual desktops", "virtual desktops",
"workspace", "workspace",