Let's say I want to run in one workspace
sleep 10 && zenity --warning --text 'Wake up!'
and then I work on other stuffs in a different workspace. How do I get this zenity window pop up in whichever workspace I'm in instead of the original workspace I typed the command in? Or is it easier to have it pop up in all the workspaces?
i haven't found an elegant way to have such a dialogue pop up in all workspaces simultaneously (multiplex), but found after some fiddling around that
wmctrl
lets you set a windows position, size and (most importantly) to have it raise it on the currently active workspace.in my specific case i needed this to work also for notifications scheduled through
cron
andat
which requires a slightly different approach as shown in the following shellscript:for some weird reason, the above script also pulls the terminal-window from which i scheduled the execution to the active workspace when scheduling with
at
and when the terminal is still open.here is another variant using the notification daemon / libnotify (check package
libnotify-bin
on debian-based systems) that won't also raise the terminal on the active workspace: