The reason the notification never goes away is because it is using notify-send
with the “critical” urgency setting. Critical notifications stay up until you click on them.
If you want to change it, you could modify the script in /usr/bin/eos-reboot-required3
.
#!/bin/bash
DoNotify() {
local -r msg="Reboot is recommended due to the upgrade of core system package(s)."
local icon=/usr/share/icons/Qogir/scalable/apps/system-reboot.svg
[ -e $icon ] || icon=system-reboot
local cmd=(
eos_notification_all # function to notify all users
$icon # icon
critical # urgency
0 # expire time (not used!)
"'EndeavourOS notification'" # appname
"Reboot recommended!" # title
"$msg" # message
RED # message color on TTY
)
"${cmd[@]}"
}
Wait-for-some-processes() {
# Wait for all pacman-like processes to finish.
systemctl disable --now eos-reboot-required.timer
sleep 1
source /usr/share/endeavouros/scripts/eos-script-lib-yad --limit-icons || return
while ps -C pacman,yay,paru,makepkg >/dev/null ; do
sleep 1
done
DoNotify
}
Wait-for-some-processes "$@"
Specifically, change the word “critical
” to “normal
”, and change the “0
” below it to however many milliseconds you want the notification to linger (change it to 10000 for ten seconds, for example). Save the file, then if you would like to test your changes you can run sudo eos-reboot-required3
.
It seems some DEs do not honor the expire-time
parameter (which seems rude in my opinion, but what do I know).
https://man.archlinux.org/man/notify-send.1.en
-t, –expire-time=TIME
The duration, in milliseconds, for the notification to appear on screen.
Not all implementations use this parameter. GNOME Shell and Notify OSD always ignore it, while Plasma ignores it for notifications with the critical urgency level.
I’m not sure if Cinnamon plays by the rules or not; you’ll have to give it a shot and let us know how it goes.
By the way, your changes to this file may be overwritten when the package that owns the script (eos-bash-shared
) gets updated. I’m not sure how often that happens, but something to bear in mind I suppose. You could always just make a backup of your custom script and copy it back over if that happens I guess, or if you want to get real hacky with it you could whip up a Pacman hook that copies over your custom script every time eos-bash-shared
gets updated…although most likely that would be a bit much.
I’m kind of making this reply inappropriately lengthy now, but one more thing to mention is you can actually disable the reboot notifications altogether if you want by changing EOS_REBOOT_RECOMMENDING=yes
to no
in /etc/eos-script-lib-yad.conf
.