[AGS] Bar progress

This commit is contained in:
2025-04-19 18:20:32 +02:00
parent 78e472beb8
commit b2f1d8fd9e
8 changed files with 249 additions and 107 deletions

View File

@@ -195,12 +195,29 @@ const startNotificationHandler = (id: number, gdkmonitor: Gdk.Monitor) => {
</window>
}
const cliHandler = ( args: string[] ): string => {
if ( args[ 1 ] == 'show' ) {
openNotificationMenu( 0 );
return 'Showing all open notifications';
} else if ( args[ 1 ] == 'hide' ) {
closeNotificationMenu( 0 );
return 'Hid all notifications';
} else if ( args[ 1 ] == 'clear' ) {
clearAllNotifications( 0 );
return 'Cleared all notifications';
} else if ( args[ 1 ] == 'clear-newest' ) {
clearNewestNotifications( 0 );
return 'Cleared newest notification';
} else if ( args[ 1 ] == 'toggle' ) {
toggleNotificationMenu( 0 );
return 'Toggled notifications';
} else {
return 'Unknown command!';
}
}
export default {
startNotificationHandler,
openNotificationMenu,
closeNotificationMenu,
clearAllNotifications,
clearNewestNotifications,
toggleNotificationMenu
cliHandler
}