Thanks to chepner's answer here about visible bells
I have made an alias for apt-get {update,upgrade,dist-upgrade} to visually notify when the task is complete
apt-get update && apt-get upgrade && apt-get dist-upgrade ; printf '\e[?5h' ; read -p '' ; printf '\e[?5l' ;
But the problem is that it flashes the screen of only that terminal tab on which this alias is running.
So for instance, you are doing another work in another application or even in another tab of the same terminal, you would not be able to see the notification that the task is complete.
I have also turned gnome visual bell on
gsettings set org.gnome.desktop.wm.preferences visual-bell true
but how can I make the use of this visual bell provided by gnome in my script to notify me when the update
, upgrade
and dist-upgrade
are all done.
If there are other visual bell options to integrate with scripts that flash the whole screen regardless of where I am in my PC when the job is done, please let me know.
Note: I am not looking for audible notifications.
printf '\e[5t'
, or to minimize and restore,printf '\e[2t'; sleep .5; printf '\e[1t'
. You can also try commands likexdotool windowraise "$WINDOWID"
if the terminal sets WINDOWID in your environment. – meuh Jul 06 '17 at 16:14