diff --git a/config/ags/js/bar/clock.js b/config/ags/js/bar/clock.js index 1de4eb8a..1da870b6 100644 --- a/config/ags/js/bar/clock.js +++ b/config/ags/js/bar/clock.js @@ -1,5 +1,5 @@ const { Box, Label } = ags.Widget; -const { toggleWindow } = ags.App; +const { toggleWindow, openWindow } = ags.App; const { DateTime } = imports.gi.GLib; import { EventBox } from '../misc/cursorbox.js'; @@ -24,7 +24,13 @@ export const Clock = EventBox({ connections: [ [ags.App, (box, windowName, visible) => { if (windowName == 'calendar') { - Clock.toggleClassName('toggle-on', visible); + if (visible) { + Clock.toggleClassName('toggle-on', true); + openWindow('closer'); + } + else { + Clock.toggleClassName('toggle-on', false); + } } }], ], diff --git a/config/ags/js/bar/notif-button.js b/config/ags/js/bar/notif-button.js index 99aca965..19b7c59d 100644 --- a/config/ags/js/bar/notif-button.js +++ b/config/ags/js/bar/notif-button.js @@ -1,5 +1,5 @@ const { Box, Label, Icon } = ags.Widget; -const { toggleWindow } = ags.App; +const { toggleWindow, openWindow } = ags.App; const { Notifications } = ags.Service; import { Separator } from '../misc/separator.js'; @@ -11,7 +11,13 @@ export const NotifButton = EventBox({ connections: [ [ags.App, (box, windowName, visible) => { if (windowName == 'notification-center') { - NotifButton.toggleClassName('toggle-on', visible); + if (visible) { + NotifButton.toggleClassName('toggle-on', true); + openWindow('closer'); + } + else { + NotifButton.toggleClassName('toggle-on', false); + } } }], ],