From 54a62679574db230fd72a5c7819d5f7715cf17c0 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 12 Jan 2025 23:00:18 +1100 Subject: notification popups --- utils/icons.ts | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'utils') 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 = { ubuntu: 0xf31b, }; -const appIcons: Record = { - "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 = { WebBrowser: "web", Printing: "print", -- cgit v1.2.3-freya