diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-12 23:00:18 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-12 23:00:18 +1100 |
| commit | 54a62679574db230fd72a5c7819d5f7715cf17c0 (patch) | |
| tree | d8b3761cba53a45179193f1b6c41cf0288bbf126 /utils | |
| parent | bar (diff) | |
| download | caelestia-shell-54a62679574db230fd72a5c7819d5f7715cf17c0.tar.gz caelestia-shell-54a62679574db230fd72a5c7819d5f7715cf17c0.tar.bz2 caelestia-shell-54a62679574db230fd72a5c7819d5f7715cf17c0.zip | |
notification popups
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/icons.ts | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/utils/icons.ts b/utils/icons.ts index 0293611..4b2d038 100644 --- a/utils/icons.ts +++ b/utils/icons.ts @@ -1,5 +1,4 @@ import { Gio } from "astal"; -import { Astal } from "astal/gtk3"; import { Apps } from "../services/apps"; // Code points from https://www.github.com/lukas-w/font-logos @@ -31,44 +30,6 @@ export const osIcons: Record<string, number> = { ubuntu: 0xf31b, }; -const appIcons: Record<string, string> = { - "code-url-handler": "visual-studio-code", - code: "visual-studio-code", - "codium-url-handler": "vscodium", - codium: "vscodium", - "GitHub Desktop": "github-desktop", - "gnome-tweaks": "org.gnome.tweaks", - "org.pulseaudio.pavucontrol": "pavucontrol", - "pavucontrol-qt": "pavucontrol", - "jetbrains-pycharm-ce": "pycharm-community", - "Spotify Free": "Spotify", - safeeyes: "io.github.slgobinath.SafeEyes", - "yad-icon-browser": "yad", - xterm: "uxterm", - "com-atlauncher-App": "atlauncher", - avidemux3_qt5: "avidemux", -}; - -const appRegex = [ - { regex: /^steam_app_(\d+)$/, replace: "steam_icon_$1" }, - { regex: /^Minecraft\* [0-9\.]+$/, replace: "minecraft" }, -]; - -export const getAppIcon = (name: string) => { - if (appIcons.hasOwnProperty(name)) return appIcons[name]; - for (const { regex, replace } of appRegex) { - const postSub = name.replace(regex, replace); - if (postSub !== name) return postSub; - } - - if (Astal.Icon.lookup_icon(name)) return name; - - const apps = Apps.fuzzy_query(name); - if (apps.length > 0) return apps[0].iconName; - - return "image"; -}; - const categoryIcons: Record<string, string> = { WebBrowser: "web", Printing: "print", |