diff options
| author | eric.marin <maarin.eric@gmail.com> | 2024-12-26 14:33:06 +0100 |
|---|---|---|
| committer | eric.marin <maarin.eric@gmail.com> | 2024-12-30 21:07:42 +0100 |
| commit | 4de5a217c25fe83bb54063f8d842b78c9e6d7fb3 (patch) | |
| tree | 0460bc0600492324f111524dfdff1ef85c9fbf8e /ags/app.ts | |
| parent | ee2b01a3fff043a8b977385227c2659bbcf2e59a (diff) | |
| download | dotfiles-4de5a217c25fe83bb54063f8d842b78c9e6d7fb3.tar.gz dotfiles-4de5a217c25fe83bb54063f8d842b78c9e6d7fb3.zip | |
wallust
Diffstat (limited to '')
| -rw-r--r-- | ags/app.ts | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ags/app.ts b/ags/app.ts new file mode 100644 index 0000000..b485250 --- /dev/null +++ b/ags/app.ts @@ -0,0 +1,28 @@ +import { App } from "astal/gtk3" +import { exec } from "astal/process" + +import Bar from "./widget/Bar" + +function updateStyle() { + App.reset_css() + exec(`sass ./style.scss /tmp/style.css`) + App.apply_css("/tmp/style.css") +} + +App.start({ + requestHandler(request, res) { + switch (request) { + case "reload": + updateStyle() + res("style reloaded") + break; + default: + res("unknown command") + break; + } + }, + main() { + updateStyle() + App.get_monitors().map(Bar) + }, +}) |
