Add AGS notification, quick settings, and sysmonitor widgets
This commit is contained in:
+22
-2
@@ -1,10 +1,30 @@
|
||||
import app from "ags/gtk3/app"
|
||||
import style from "./style.css"
|
||||
import Media from "./widget/Media"
|
||||
import NotificationCenter from "./widget/Notifications"
|
||||
import QuickSettings from "./widget/QuickSettings"
|
||||
import SysMonitor from "./widget/SysMonitor"
|
||||
import WallPicker from "./widget/WallPicker"
|
||||
|
||||
const SHOW_DESKTOP_MEDIA = false
|
||||
|
||||
function start(name: string, build: () => unknown) {
|
||||
try {
|
||||
build()
|
||||
} catch (error) {
|
||||
console.error(`Failed to start widget "${name}":`, error)
|
||||
}
|
||||
}
|
||||
|
||||
app.start({
|
||||
css: style,
|
||||
main() {
|
||||
app.get_monitors().map(Media)
|
||||
if (SHOW_DESKTOP_MEDIA) {
|
||||
app.get_monitors().map(Media)
|
||||
}
|
||||
start("notification-center", NotificationCenter)
|
||||
start("quick-settings", QuickSettings)
|
||||
start("sys-monitor", SysMonitor)
|
||||
start("wall-picker", WallPicker)
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user