diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-08 16:01:36 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-08 16:01:36 +1000 |
| commit | b0f857f0d1a1bec3d9c56a6e76d54932bfc6bf01 (patch) | |
| tree | fe3ede646c1a2f4f7abf3ba62cb3433113b35015 /src/modules/bar.tsx | |
| parent | dev: use typescript 5.7.3 to fix jsx type errors (diff) | |
| download | caelestia-shell-b0f857f0d1a1bec3d9c56a6e76d54932bfc6bf01.tar.gz caelestia-shell-b0f857f0d1a1bec3d9c56a6e76d54932bfc6bf01.tar.bz2 caelestia-shell-b0f857f0d1a1bec3d9c56a6e76d54932bfc6bf01.zip | |
feat: add navbar
For controlling sidebar panes + other stuff later
Diffstat (limited to 'src/modules/bar.tsx')
| -rw-r--r-- | src/modules/bar.tsx | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/modules/bar.tsx b/src/modules/bar.tsx index 447b69d..5a0fee3 100644 --- a/src/modules/bar.tsx +++ b/src/modules/bar.tsx @@ -1,4 +1,3 @@ -import type SideBar from "@/modules/sidebar"; import type { Monitor } from "@/services/monitors"; import Players from "@/services/players"; import Updates from "@/services/updates"; @@ -18,6 +17,7 @@ import AstalNetwork from "gi://AstalNetwork"; import AstalNotifd from "gi://AstalNotifd"; import AstalTray from "gi://AstalTray"; import AstalWp from "gi://AstalWp"; +import { switchPane } from "./sidebar"; interface ClassNameProps { beforeSpacer: boolean; @@ -75,15 +75,6 @@ const hookFocusedClientProp = ( callback(lastClient); }; -const switchPane = (monitor: Monitor, name: string) => { - const sidebar = App.get_window(`sidebar${monitor.id}`) as SideBar | null; - if (sidebar) { - if (sidebar.visible && sidebar.shown.get() === name) sidebar.hide(); - else sidebar.show(); - sidebar.shown.set(name); - } -}; - const getClassName = ({ beforeSpacer, afterSpacer, first, last }: ClassNameProps) => `${beforeSpacer ? "before-spacer" : ""} ${afterSpacer ? "after-spacer" : ""}` + ` ${first ? "first" : ""} ${last ? "last" : ""}`; |