import { App } from "astal/gtk4" import style from "./style.scss" import Bar from "./components/bar/Bar"; import AstalHyprland from "gi://AstalHyprland?version=0.1"; App.start({ instanceName: "runner", css: style, main() { 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( ' ' ); if ( args[ 0 ] === 'notifier' ) { res( 'Not available here yet, run astal -i notifier ' + args[ 1 ] ); // res( notifications.cliHandler( args ) ); } else if ( args[ 0 ] === 'bar' ) { res( Bar.cliHandler( args ) ); } }, })