// Copyright (C) 2026 Danilo M. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. pragma Singleton import Quickshell import QtQuick // The desktop icon for each workspace, the eight waybar drew and the window // switcher and the island show. Names, not paths: they are resolved through // the active icon theme, so an icon theme switch changes them everywhere. // A named workspace, or one past eight, has none, and callers fall back to // its number. Singleton { readonly property var icons: ({ 1: "web-browser", 2: "text-editor", 3: "utilities-terminal", 4: "network-server", 5: "document-edit", 6: "applications-graphics", 7: "dialog-messages", 8: "input-gaming", }) function icon(name) { const n = parseInt(String(name), 10); if (isNaN(n)) return ""; return icons[n] ?? ""; } }