mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-09 15:05:39 -05:00
replace dumb function
This commit is contained in:
@@ -44,35 +44,8 @@ Singleton {
|
||||
function getDisplayName(appId) {
|
||||
if (!appId)
|
||||
return "";
|
||||
|
||||
const appNames = {
|
||||
"com.mitchellh.ghostty": "Ghostty",
|
||||
"org.mozilla.firefox": "Firefox",
|
||||
"org.gnome.Nautilus": "Files",
|
||||
"org.gnome.TextEditor": "Text Editor",
|
||||
"com.google.Chrome": "Chrome",
|
||||
"org.telegram.desktop": "Telegram",
|
||||
"com.spotify.Client": "Spotify",
|
||||
"org.kde.konsole": "Konsole",
|
||||
"org.gnome.Terminal": "Terminal",
|
||||
"code": "VS Code",
|
||||
"code-oss": "VS Code",
|
||||
"org.mozilla.Thunderbird": "Thunderbird",
|
||||
"org.libreoffice.LibreOffice": "LibreOffice",
|
||||
"org.gimp.GIMP": "GIMP",
|
||||
"org.blender.Blender": "Blender",
|
||||
"discord": "Discord",
|
||||
"slack": "Slack",
|
||||
"zoom": "Zoom"
|
||||
};
|
||||
if (appNames[appId])
|
||||
return appNames[appId];
|
||||
|
||||
|
||||
let cleanName = appId.replace(/^(org\.|com\.|net\.|io\.)/, '').replace(/\./g, ' ').split(' ').map((word) => {
|
||||
return word.charAt(0).toUpperCase() + word.slice(1);
|
||||
}).join(' ');
|
||||
return cleanName;
|
||||
const desktopEntry = DesktopEntries.byId(appId);
|
||||
return desktopEntry && desktopEntry.name ? desktopEntry.name : "";
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
|
||||
Reference in New Issue
Block a user