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

launcher: add name, icon, description overrides + hide/unhide options

- convenient helpers without needing to make .desktop overrides
fixes #1329
This commit is contained in:
bbedward
2026-01-18 20:30:50 -05:00
parent 7cb39f00ad
commit 0f6ae11c3d
14 changed files with 1359 additions and 397 deletions

View File

@@ -68,6 +68,27 @@ Item {
hideRequested();
}
readonly property bool isRegularApp: desktopEntry && !currentApp?.isPlugin && !currentApp?.isCore && !currentApp?.isAction && !currentApp?.isBuiltInLauncher
signal editAppRequested(var app)
function hideCurrentApp() {
if (!desktopEntry)
return;
const appId = desktopEntry.id || desktopEntry.execString || "";
SessionData.hideApp(appId);
if (appLauncher)
appLauncher.updateFilteredModel();
hideRequested();
}
function editCurrentApp() {
if (!desktopEntry)
return;
editAppRequested(desktopEntry);
hideRequested();
}
readonly property var menuItems: {
const items = [];
@@ -103,6 +124,21 @@ Item {
action: togglePin
});
if (isRegularApp) {
items.push({
type: "item",
icon: "visibility_off",
text: I18n.tr("Hide App"),
action: hideCurrentApp
});
items.push({
type: "item",
icon: "edit",
text: I18n.tr("Edit App"),
action: editCurrentApp
});
}
if (desktopEntry && desktopEntry.actions) {
items.push({
type: "separator"