From 1ca4c86b288ed44bd1c85f314a24f51590cfec9c Mon Sep 17 00:00:00 2001 From: sickle-phin <114330858+sickle-phin@users.noreply.github.com> Date: Sun, 26 Jul 2026 06:20:12 +0900 Subject: [PATCH] launcher: add Steam and Waydroid badges --- .../Modals/DankLauncherV2/ControllerUtils.js | 6 ++++++ quickshell/Modals/DankLauncherV2/SourceBadge.qml | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/quickshell/Modals/DankLauncherV2/ControllerUtils.js b/quickshell/Modals/DankLauncherV2/ControllerUtils.js index f68f95392..c4bc4a0c7 100644 --- a/quickshell/Modals/DankLauncherV2/ControllerUtils.js +++ b/quickshell/Modals/DankLauncherV2/ControllerUtils.js @@ -131,6 +131,12 @@ function classifyAppSource(app) { || exec.indexOf("/etc/profiles/per-user/") !== -1) return "nix"; + if (exec.indexOf("steam steam://rungameid/") !== -1) + return "steam"; + + if (exec.indexOf("waydroid app ") !== -1) + return "waydroid"; + return "system"; } diff --git a/quickshell/Modals/DankLauncherV2/SourceBadge.qml b/quickshell/Modals/DankLauncherV2/SourceBadge.qml index 8913e6f55..035b438b2 100644 --- a/quickshell/Modals/DankLauncherV2/SourceBadge.qml +++ b/quickshell/Modals/DankLauncherV2/SourceBadge.qml @@ -1,4 +1,5 @@ import QtQuick +import Quickshell import Quickshell.Widgets import qs.Common @@ -12,7 +13,9 @@ Item { "flatpak": "../../assets/package-sources/flatpak.svg", "snap": "../../assets/package-sources/snap.svg", "appimage": "../../assets/package-sources/appimage.svg", - "nix": "../../assets/package-sources/nix.svg" + "nix": "../../assets/package-sources/nix.svg", + "steam": "steam", + "waydroid": "waydroid" }) readonly property string assetPath: sourceAsset[source] || "" @@ -23,7 +26,16 @@ Item { IconImage { anchors.fill: parent - source: root.assetPath ? Qt.resolvedUrl(root.assetPath) : "" + source: { + if (!root.assetPath) { + return ""; + } + if (root.assetPath.indexOf("/") !== -1) { + return Qt.resolvedUrl(root.assetPath); + } else { + return Quickshell.iconPath(root.assetPath); + } + } implicitSize: root.glyphSize * 2 backer.sourceSize: Qt.size(root.glyphSize * 2, root.glyphSize * 2) smooth: true