summaryrefslogtreecommitdiff
path: root/src/modules/bar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/bar.tsx')
-rw-r--r--src/modules/bar.tsx11
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" : ""}`;