Skip to content

Commit

Permalink
messageTray.js and cs_notifications.py: Add an option for showing not…
Browse files Browse the repository at this point in the history
…ifications in fullscreen
  • Loading branch information
rcalixte committed Oct 22, 2023
1 parent 5d420b3 commit a87eb3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def on_module_selected(self):
switch = GSettingsSwitch(_("Show notifications on the bottom side of the screen"), "org.cinnamon.desktop.notifications", "bottom-notifications")
settings.add_reveal_row(switch, "org.cinnamon.desktop.notifications", "display-notifications")

switch = GSettingsSwitch(_("Display notifications over fullscreen windows (experimental)"), "org.cinnamon.desktop.notifications", "fullscreen-notifications")
settings.add_reveal_row(switch, "org.cinnamon.desktop.notifications", "display-notifications")

spin = GSettingsSpinButton(_("Notification duration"), "org.cinnamon.desktop.notifications", "notification-duration", _("seconds"), 1, 60, 1, 1)
settings.add_reveal_row(spin, "org.cinnamon.desktop.notifications", "display-notifications")

Expand Down
4 changes: 3 additions & 1 deletion js/ui/messageTray.js
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,9 @@ MessageTray.prototype = {
if (!this._notification.silent || this._notification.urgency >= Urgency.HIGH) {
Main.soundManager.play('notification');
}
if (this._notification.urgency == Urgency.CRITICAL) {

this._showFullscreenNotifications = this.settings.get_boolean("fullscreen-notifications");
if (this._notification.urgency == Urgency.CRITICAL || this._showFullscreenNotifications) {
Main.layoutManager._chrome.modifyActorParams(this._notificationBin, { visibleInFullscreen: true });
} else {
Main.layoutManager._chrome.modifyActorParams(this._notificationBin, { visibleInFullscreen: false });
Expand Down

0 comments on commit a87eb3f

Please sign in to comment.