Pop-up notification at a specified time or after a specified timeout

How to display a pop-up notification in a specified time?

2 Answers

Pop-up notification at a specified time:

echo 'notify-send "Go out for a coffee!"' | at 3:14PM

After a specified timeout:

echo 'notify-send "Go out for a coffee!"' | at now + 1 minutes
2

If you want a popup dialog window, use zenity, e.g. like this:

zenity --info --title "Your title" --text "Your text"

This will create a dialog window with "Your title" as title, "Your text" as body text and an OK button.

To delay this, you can e.g. use sleep and specify the delay in seconds (default), minutes (append m) or hours (append h). Here's an example that waits 30 minutes:

sleep 30m && zenity --info --title "Your title" --text "Your text"

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like