blob: 3b62d821a03b15f4aec44904c4b3e7f17543e5ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
import type { Monitor } from "@/services/monitors";
import { bind, register, Variable } from "astal";
import { App, Astal, Gtk, Widget } from "astal/gtk3";
import Dashboard from "./dashboard";
@register()
export default class SideBar extends Widget.Window {
readonly shown: Variable<string> = Variable("dashboard");
constructor({ monitor }: { monitor: Monitor }) {
super({
application: App,
name: "sidebar",
namespace: "caelestia-sidebar",
monitor: monitor.id,
anchor: Astal.WindowAnchor.LEFT | Astal.WindowAnchor.TOP | Astal.WindowAnchor.BOTTOM,
exclusivity: Astal.Exclusivity.EXCLUSIVE,
// visible: false,
});
this.add(
<box vertical className="sidebar">
<stack
vexpand
transitionType={Gtk.StackTransitionType.SLIDE_UP_DOWN}
transitionDuration={200}
shown={bind(this.shown)}
>
<Dashboard />
</stack>
</box>
);
}
}
|