-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.ts
37 lines (32 loc) · 1.02 KB
/
app.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/gjs -m
import { App } from "astal/gtk3"
import Bar from "./windows/bar"
import Startmenu from "./windows/startmenu"
import VolumePopup from "./windows/volumepopup"
import Clickaway from "./windows/clickaway"
import Launcher from "./windows/launcher"
import { PlayerControlObj } from "./utils/player"
import style from "./themes/catppuccin_mocha/style.scss"
import "./utils/scss_auto_reload"
App.start({
css: style,
icons: `${SRC}/icons`,
async main() {
const clickaway_windows = [
Startmenu(),
Launcher(),
]
Bar()
VolumePopup()
Clickaway(await Promise.all(clickaway_windows)).catch(console.error)
},
requestHandler(request: string, res: (response: any) => void) {
// HACK: can't figure out what tsconfig option makes the lsp accept this function
if ((Object as any).hasOwn(PlayerControlObj, request)) {
PlayerControlObj[request]()
res("")
}
else
res("unknown command")
}
})