mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
feat: configurable app id substitutions (#1317)
* feat: add configurable app ID substitutions setting * feat: add live icon updates when substitutions change * fix: cursor not showing on headerActions in non-collapsible cards * fix: address PR review feedback - add tags for search index - remove hardcoded height from text fields
This commit is contained in:
@@ -56,6 +56,13 @@ BasePill {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: SettingsData
|
||||
function onAppIdSubstitutionsChanged() {
|
||||
root.updateDesktopEntry();
|
||||
}
|
||||
}
|
||||
|
||||
function updateDesktopEntry() {
|
||||
if (activeWindow && activeWindow.appId) {
|
||||
const moddedId = Paths.moddedAppId(activeWindow.appId);
|
||||
|
||||
@@ -69,6 +69,7 @@ Item {
|
||||
|
||||
property int _desktopEntriesUpdateTrigger: 0
|
||||
property int _toplevelsUpdateTrigger: 0
|
||||
property int _appIdSubstitutionsTrigger: 0
|
||||
|
||||
readonly property var sortedToplevels: {
|
||||
_toplevelsUpdateTrigger;
|
||||
@@ -95,6 +96,13 @@ Item {
|
||||
_desktopEntriesUpdateTrigger++;
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: SettingsData
|
||||
function onAppIdSubstitutionsChanged() {
|
||||
_appIdSubstitutionsTrigger++;
|
||||
}
|
||||
}
|
||||
readonly property var groupedWindows: {
|
||||
if (!SettingsData.runningAppsGroupByApp) {
|
||||
return [];
|
||||
@@ -364,6 +372,7 @@ Item {
|
||||
height: Theme.barIconSize(root.barThickness)
|
||||
source: {
|
||||
root._desktopEntriesUpdateTrigger;
|
||||
root._appIdSubstitutionsTrigger;
|
||||
if (!appId)
|
||||
return "";
|
||||
const moddedId = Paths.moddedAppId(appId);
|
||||
@@ -596,6 +605,7 @@ Item {
|
||||
height: Theme.barIconSize(root.barThickness)
|
||||
source: {
|
||||
root._desktopEntriesUpdateTrigger;
|
||||
root._appIdSubstitutionsTrigger;
|
||||
if (!appId)
|
||||
return "";
|
||||
const moddedId = Paths.moddedAppId(appId);
|
||||
|
||||
@@ -265,7 +265,8 @@ Item {
|
||||
|
||||
if (!byApp[key]) {
|
||||
const isQuickshell = keyBase === "org.quickshell";
|
||||
const desktopEntry = DesktopEntries.heuristicLookup(keyBase);
|
||||
const moddedId = Paths.moddedAppId(keyBase);
|
||||
const desktopEntry = DesktopEntries.heuristicLookup(moddedId);
|
||||
const icon = Paths.getAppIcon(keyBase, desktopEntry);
|
||||
byApp[key] = {
|
||||
"type": "icon",
|
||||
@@ -1367,6 +1368,9 @@ Item {
|
||||
function onWorkspaceNameIconsChanged() {
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
function onAppIdSubstitutionsChanged() {
|
||||
delegateRoot.updateAllData();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: DwlService
|
||||
|
||||
Reference in New Issue
Block a user