diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-26 16:57:16 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-26 16:57:16 +1100 |
| commit | 5ac2cc2f27dc587fbd3d5bb1b8efb53f147185d1 (patch) | |
| tree | 3a11d3c9e01639887b126b180f36902a9b91976f /src/modules | |
| parent | sidebar: connectivity pane (diff) | |
| download | caelestia-shell-5ac2cc2f27dc587fbd3d5bb1b8efb53f147185d1.tar.gz caelestia-shell-5ac2cc2f27dc587fbd3d5bb1b8efb53f147185d1.tar.bz2 caelestia-shell-5ac2cc2f27dc587fbd3d5bb1b8efb53f147185d1.zip | |
sidebar: fix negative content width warnings
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/sidebar/index.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/sidebar/index.tsx b/src/modules/sidebar/index.tsx index 2a13f5c..5b9a3a3 100644 --- a/src/modules/sidebar/index.tsx +++ b/src/modules/sidebar/index.tsx @@ -1,7 +1,7 @@ import type { Monitor } from "@/services/monitors"; -import { bind, register, Variable } from "astal"; +import { bind, idle, register, Variable } from "astal"; import { App, Astal, Gdk, Gtk, Widget } from "astal/gtk3"; -import { sidebar } from "config"; +import { sidebar as config } from "config"; import Connectivity from "./connectivity"; import Dashboard from "./dashboard"; import NotifPane from "./notifpane"; @@ -18,7 +18,7 @@ export default class SideBar extends Widget.Window { monitor: monitor.id, anchor: Astal.WindowAnchor.LEFT | Astal.WindowAnchor.TOP | Astal.WindowAnchor.BOTTOM, exclusivity: Astal.Exclusivity.EXCLUSIVE, - visible: sidebar.showOnStartup.get(), + visible: false, }); const panes = [<Dashboard />, <Connectivity />, <NotifPane />]; @@ -46,5 +46,7 @@ export default class SideBar extends Widget.Window { </box> </eventbox> ); + + if (config.showOnStartup.get()) idle(() => this.show()); } } |