49 lines
1.1 KiB
TypeScript
49 lines
1.1 KiB
TypeScript
import { App } from "astal/gtk3";
|
|
import style from "./style.css";
|
|
import Bar from "./widget/Bar";
|
|
import "@/globals";
|
|
import { SwayConnection } from "@services/compositor";
|
|
import { OutputService } from "@/services/outputs/service";
|
|
import { ConfigService } from "@/services/config/service";
|
|
|
|
new SwayConnection();
|
|
new OutputService();
|
|
const confSrv = new ConfigService();
|
|
confSrv.connect("config-reloaded", () => {
|
|
console.log(confSrv.config);
|
|
console.log(
|
|
confSrv.doConfigMath(
|
|
String(confSrv.config.layouts?.battlestation.primary.position[0] ?? ""),
|
|
{
|
|
auxiliary: 50,
|
|
"left-wing": 250,
|
|
},
|
|
),
|
|
);
|
|
console.log(
|
|
confSrv.formatConfigString("{this.is.a.test.of.nested.parsing}", {
|
|
this: {
|
|
is: {
|
|
a: {
|
|
test: {
|
|
of: {
|
|
nested: {
|
|
parsing: "This was a successful test of nested parsing!",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}),
|
|
);
|
|
});
|
|
|
|
App.start({
|
|
css: style,
|
|
main() {
|
|
Bar(0);
|
|
// Bar(1) // initialize other monitors
|
|
},
|
|
});
|