From b0f857f0d1a1bec3d9c56a6e76d54932bfc6bf01 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Tue, 8 Apr 2025 16:01:36 +1000
Subject: feat: add navbar

For controlling sidebar panes + other stuff later
---
 src/modules/bar.tsx | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

(limited to 'src/modules/bar.tsx')

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" : ""}`;
-- 
cgit v1.2.3-freya

