Is it possible to change the notification popup timeout?
TIA
Notification timeout...[SOLVED]
Notification timeout...[SOLVED]
Last edited by invex on Tue Mar 24, 2020 8:35 pm, edited 1 time in total.
Re: Notification timeout...
Cinnamon deals with notification time-outs a bit weirdly.
The application providing the notification can specify a timeout, but that doesn't control how long the notification is visible on screen (unless the timeout is shorter than the default) only how long it will stay in the notification tray before disappearing for good assuming 'Remove notifications after timeout is reached' is checked in the main Notification Settings.

The actual time on screen for transient notifications is hardcoded on
The hard-coded values are near the start of the file and look like this. Time is in seconds.
NOTIFICATION_TIMEOUT is the default timeout
NOTIFICATION_CRITICAL_TIMEOUT_WITH_APPLET is used if the notification is flagged by the sending app as CRITICAL and the notification applet is present. If the applet is absent critical notifications won't timeout.
So if you wanted to tweak
Make a back up
Open the file with elevated privileges
Once tweaked and saved restart Cinnamon with
The application providing the notification can specify a timeout, but that doesn't control how long the notification is visible on screen (unless the timeout is shorter than the default) only how long it will stay in the notification tray before disappearing for good assuming 'Remove notifications after timeout is reached' is checked in the main Notification Settings.

The actual time on screen for transient notifications is hardcoded on
/usr/share/cinnamon/js/ui/messageTray.js
. Luckily it's a plain text javascript file so amenable to end user tweaking (after making a backup and with elevated privileges)The hard-coded values are near the start of the file and look like this. Time is in seconds.
Code: Select all
var NOTIFICATION_TIMEOUT = 4;
var NOTIFICATION_CRITICAL_TIMEOUT_WITH_APPLET = 10;
NOTIFICATION_CRITICAL_TIMEOUT_WITH_APPLET is used if the notification is flagged by the sending app as CRITICAL and the notification applet is present. If the applet is absent critical notifications won't timeout.
So if you wanted to tweak
Make a back up
Code: Select all
sudo cp /usr/share/cinnamon/js/ui/messageTray.js /usr/share/cinnamon/js/ui/messageTray.js.original
Code: Select all
xed admin:///usr/share/cinnamon/js/ui/messageTray.js
Ctrl-Alt-Esc
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Notification timeout...[SOLVED]
Perfect.
Thank you very much.
Thank you very much.