I would like the window produced by zenity to be configured so it is always on top. There does not appear to be an option to enable this. Can someone suggest a source change to the zenity code so that I can get this to work? I want to be able to do zenity --ontop "warning"
If there is an alternative which does not involve writing code, I would be interested in this too.
Something like this will keep a zenity Information dialog
on top
.You can possibly adapt it to your particular needs.
I'm not sure why it needs the
sleep
, but is doesn't work without it.Naturally, both zenity and wmctrl need to be installed. The two DISPLAY=:0 portions are probably necessary if you run the script as a cron job because cron's environment is not aware of your X display, dbus or desktop.