5

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

2 Answers 2

6

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
  • Please note that these notification bubbles fade away after a few seconds. They do not persist until you click them. I do not know what exactly the OP wants though.
    – Byte Commander
    Jul 29, 2016 at 13:10
  • 1
    Oh, I just noticed that you answered your own question... :D
    – Byte Commander
    Jul 29, 2016 at 13:34
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"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .