5

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

frostman
  • 1,857

2 Answers2

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
frostman
  • 1,857
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"
Byte Commander
  • 107,489