Restructure, prepare launcher
This commit is contained in:
29
config/ags/notifications/app.ts
Normal file
29
config/ags/notifications/app.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { App } from "astal/gtk3"
|
||||
import style from "./style.scss"
|
||||
|
||||
import not from "./handler"
|
||||
|
||||
App.start({
|
||||
instanceName: "notifier",
|
||||
css: style,
|
||||
main() {
|
||||
not.startNotificationHandler( 0, App.get_monitors()[0] )
|
||||
},
|
||||
requestHandler(request, res) {
|
||||
if ( request == 'show' ) {
|
||||
not.openNotificationMenu( 0 );
|
||||
res( 'Showing all open notifications' );
|
||||
} else if ( request == 'hide' ) {
|
||||
not.closeNotificationMenu( 0 );
|
||||
res( 'Hid all notifications' );
|
||||
} else if ( request == 'clear' ) {
|
||||
not.clearAllNotifications( 0 );
|
||||
res( 'Cleared all notifications' );
|
||||
} else if ( request == 'clear-newest' ) {
|
||||
not.clearNewestNotifications( 0 );
|
||||
res( 'Cleared newest notification' );
|
||||
} else {
|
||||
res( 'Unknown command!' );
|
||||
}
|
||||
},
|
||||
})
|
Reference in New Issue
Block a user