1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 07:22:50 -05:00

widgets: add fallback for steam apps

This commit is contained in:
bbedward
2026-01-15 21:07:33 -05:00
parent 1c10746e50
commit 77794deb2c
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;
}