From 02fd2e97f2c8a53bf2344e6fa8b14769cb15ee38 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:35:37 +1100 Subject: refactor: move ts to src Also move popupwindow to own file --- utils/system.ts | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 utils/system.ts (limited to 'utils/system.ts') diff --git a/utils/system.ts b/utils/system.ts deleted file mode 100644 index 5d77908..0000000 --- a/utils/system.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { execAsync, GLib } from "astal"; -import type AstalApps from "gi://AstalApps"; -import { osIcons } from "./icons"; - -export const launch = (app: AstalApps.Application) => { - execAsync(["uwsm", "app", "--", app.entry]).catch(() => { - app.frequency--; // Decrement frequency cause launch also increments it - app.launch(); - }); - app.frequency++; -}; - -export const osId = GLib.get_os_info("ID") ?? "unknown"; -export const osIdLike = GLib.get_os_info("ID_LIKE"); -export const osIcon = String.fromCodePoint( - (() => { - if (osIcons.hasOwnProperty(osId)) return osIcons[osId]; - if (osIdLike) for (const id of osIdLike.split(" ")) if (osIcons.hasOwnProperty(id)) return osIcons[id]; - return 0xf31a; - })() -); -- cgit v1.2.3-freya