From ad22dbdfebbb0def2ec2d8e2c91469e9a9e4fdf7 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Thu, 30 Jan 2025 21:31:19 +1100
Subject: sideleft: create popdown window
---
src/modules/bar.tsx | 32 +++---
src/modules/popdowns/index.tsx | 2 +
src/modules/popdowns/sideleft.tsx | 203 ++++++++++++++++++++++++++++++++++++++
src/services/cpu.ts | 45 +++++++++
src/services/gpu.ts | 55 +++++++++++
src/services/memory.ts | 60 +++++++++++
src/services/storage.ts | 61 ++++++++++++
7 files changed, 447 insertions(+), 11 deletions(-)
create mode 100644 src/modules/popdowns/sideleft.tsx
create mode 100644 src/services/cpu.ts
create mode 100644 src/services/gpu.ts
create mode 100644 src/services/memory.ts
create mode 100644 src/services/storage.ts
(limited to 'src')
diff --git a/src/modules/bar.tsx b/src/modules/bar.tsx
index eb42d0b..16c505a 100644
--- a/src/modules/bar.tsx
+++ b/src/modules/bar.tsx
@@ -1,21 +1,21 @@
+import type { Monitor } from "@/services/monitors";
+import Players from "@/services/players";
+import Updates from "@/services/updates";
+import { getAppCategoryIcon } from "@/utils/icons";
+import { ellipsize } from "@/utils/strings";
+import { bindCurrentTime, osIcon } from "@/utils/system";
+import { setupCustomTooltip } from "@/utils/widgets";
+import type PopupWindow from "@/widgets/popupwindow";
import { execAsync, register, Variable } from "astal";
import { bind, kebabify } from "astal/binding";
import { App, Astal, astalify, Gdk, Gtk, type ConstructProps } from "astal/gtk3";
+import { bar as config } from "config";
import AstalBluetooth from "gi://AstalBluetooth";
import AstalHyprland from "gi://AstalHyprland";
import AstalNetwork from "gi://AstalNetwork";
import AstalNotifd from "gi://AstalNotifd";
import AstalTray from "gi://AstalTray";
import AstalWp01 from "gi://AstalWp";
-import { bar as config } from "../../config";
-import type { Monitor } from "../services/monitors";
-import Players from "../services/players";
-import Updates from "../services/updates";
-import { getAppCategoryIcon } from "../utils/icons";
-import { ellipsize } from "../utils/strings";
-import { bindCurrentTime, osIcon } from "../utils/system";
-import { setupCustomTooltip } from "../utils/widgets";
-import type PopupWindow from "../widgets/popupwindow";
const hyprland = AstalHyprland.get_default();
@@ -44,7 +44,13 @@ const togglePopup = (self: JSX.Element, event: Astal.ClickEvent, name: string) =
}
};
-const OSIcon = () => ;
+const OSIcon = () => (
+