1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

widgets: add fallback for steam apps

This commit is contained in:
bbedward
2026-01-15 21:07:33 -05:00
parent 172a743de4
commit a823095372
5 changed files with 83 additions and 6 deletions

View File

@@ -45,6 +45,10 @@ Singleton {
Quickshell.execDetached(["cp", strip(from), strip(to)]);
}
function isSteamApp(appId: string): bool {
return appId && /^steam_app_\d+$/.test(appId);
}
function moddedAppId(appId: string): string {
const subs = SettingsData.appIdSubstitutions || [];
for (let i = 0; i < subs.length; i++) {
@@ -60,6 +64,9 @@ Singleton {
}
}
}
const steamMatch = appId.match(/^steam_app_(\d+)$/);
if (steamMatch)
return `steam_icon_${steamMatch[1]}`;
return appId;
}