From ae631a8e637533c69515f2320d3d8554a782618b Mon Sep 17 00:00:00 2001 From: Sho Date: Sun, 2 Aug 2026 14:35:55 +0900 Subject: [PATCH] fix: resolve official Overwatch 2 game logo icon for taskbar --- quickshell/modules/dock/BottomDock.qml | 8 ++++++-- quickshell/services/python/active_window_service.py | 11 ++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/quickshell/modules/dock/BottomDock.qml b/quickshell/modules/dock/BottomDock.qml index 048ac98..9e2604d 100644 --- a/quickshell/modules/dock/BottomDock.qml +++ b/quickshell/modules/dock/BottomDock.qml @@ -376,8 +376,11 @@ Item { return mapped.startsWith("file://") ? mapped : "file://" + mapped } - // 2. Hardcoded fallback overrides for common system apps + // 2. Hardcoded fallback overrides for common system apps & games let themeDir = Theme.iconTheme + if (clean.includes("overwatch") || clean.includes("2357570")) { + return "file:///usr/share/icons/" + themeDir + "/64x64/apps/overwatch.svg" + } if (clean.includes("alacritty")) return "file:///usr/share/icons/" + themeDir + "/32x32/apps/Alacritty.svg" if (clean.includes("dolphin")) return "file:///usr/share/icons/" + themeDir + "/32x32/apps/org.kde.dolphin.svg" if (clean.includes("firefox")) return "file:///usr/share/icons/" + themeDir + "/32x32/apps/firefox.svg" @@ -390,12 +393,13 @@ Item { // Helper: Formatted Program Name Cleaner function getCleanProgramName(app) { if (!app) return "Application"; - if (app.name && app.name !== "" && app.name !== app.appId) return app.name; + if (app.name && app.name !== "" && app.name !== app.appId && app.name !== "Steam Game (2357570)") return app.name; let id = app.appId || ""; if (!id) return "Application"; let raw = id.includes(".") ? id.split(".").pop() : id; raw = raw.replace(/[-_]/g, " "); let lower = raw.toLowerCase(); + if (lower.includes("overwatch") || lower.includes("2357570")) return "Overwatch 2"; if (lower === "alacritty") return "Alacritty"; if (lower === "dolphin") return "Dolphin"; if (lower === "firefox") return "Firefox"; diff --git a/quickshell/services/python/active_window_service.py b/quickshell/services/python/active_window_service.py index 5cb84fd..4cfe82c 100755 --- a/quickshell/services/python/active_window_service.py +++ b/quickshell/services/python/active_window_service.py @@ -155,7 +155,16 @@ def resolve_game_info(app_lower): if steam_id == '2357570': if not game_name: game_name = "Overwatch 2" - if not game_icon or game_icon == "com.valvesoftware.Steam": game_icon = "overwatch" + ow_full = None + for d in _search_dirs: + if not os.path.exists(d): continue + for ext in ['.svg', '.png']: + t = os.path.join(d, "overwatch" + ext) + if os.path.exists(t): ow_full = t; break + t2 = os.path.join(d, "lutris_overwatch" + ext) + if os.path.exists(t2): ow_full = t2; break + if ow_full: break + game_icon = ow_full or "overwatch" if not game_name: game_name = f"Steam Game ({steam_id})"