feat: move status-bar to seperate repository, initial commit

This commit is contained in:
2025-09-24 21:11:28 -07:00
commit 68142eac7c
24 changed files with 664 additions and 0 deletions

29
app.ts Normal file
View File

@@ -0,0 +1,29 @@
import { App, Gdk } from "astal/gtk3";
import style from "./style.scss";
import Bar from "./widget/Bar";
import { GLib } from "astal";
App.start({
css: style,
icons: "icons",
main() {},
});
let knownMonitors = new Set();
function checkMonitors() {
const currentMonitors = App.get_monitors();
currentMonitors.forEach((monitor) => {
if (!knownMonitors.has(monitor.model)) {
knownMonitors.add(monitor.model);
Bar(monitor);
}
});
}
checkMonitors();
GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 10, () => {
checkMonitors();
return true;
});