[AGS] Bar: Done (WiFi still missing, will be added at some later point)

This commit is contained in:
2025-04-24 16:58:30 +02:00
parent e93e051094
commit 10136ab9de
48 changed files with 1423 additions and 548 deletions

View File

@@ -1,21 +1,23 @@
import { App } from "astal/gtk4"
import style from "./style.scss"
// import notifications from "./components/notifications/handler";
import Bar from "./components/bar/ui/Bar";
import Bar from "./components/bar/Bar";
import AstalHyprland from "gi://AstalHyprland?version=0.1";
App.start({
instanceName: "runner",
css: style,
main() {
// notifications.startNotificationHandler( App.get_monitors()[0] );
// TODO: Monitor handling
Bar.Bar( App.get_monitors()[0] );
const hypr = AstalHyprland.get_default();
const monitors = App.get_monitors();
for (let index = 0; index < monitors.length; index++) {
Bar.Bar( monitors[ index ] );
}
// TODO: Handle monitor add
},
requestHandler(request, res) {
const args = request.trimStart().split( ' ' );
// Notifications (TODO: Handle the arguments in the components themselves)
if ( args[ 0 ] === 'notifier' ) {
res( 'Not available here yet, run astal -i notifier ' + args[ 1 ] );
// res( notifications.cliHandler( args ) );