3

Sometimes I get interrupted while programming and would like to have some sort of alarm function that can remind me to do sometihing important.

I do not want to build a clock, nor do I want the kind of thing my smartphone does.

Just an on-screen reminder would be best. Non-recurring. I know there used to be a program called reminder that would do this. I also know about sticky-notes but have a policy of never changing my repositories for any reason. Also there is one called something like remindor but it won't work with 16.04 LTS.

So now I can't locate anything similar.

Maybe someone in the community knows this.

How can I make my Ubuntu do this easily? Hopefully with just a single command (because this is usually in response to a phone call for help elsewhere).

---EDIT: I had to actually install the at command on Ubuntu 16.04 LTS:

sudo aptitude install at
SDsolar
  • 3,239
  • 1
    Do you mean something like xpad or notify-send Reminder:XXX – M. Becerra Jul 16 '17 at 10:38
  • 1
    Maybe a better one would be echo 'notify-send "FINISH THAT MIDNIGHT PROGRAM"' | at 20:00 – M. Becerra Jul 16 '17 at 11:20
  • OK, I see how that notify-send works. It even appears on all the multiple desktops. However, it only stays on the screen for a brief few seconds, and is silent, so there must be some command-line switches (https://developer.gnome.org/notification-spec/#hints) I need to look at. But this is on the right track. I can see how it would be handy to let a cron job send a progress message. Excellent. – SDsolar Jul 16 '17 at 18:32
  • @SDsolar I think you are looking for -u critial – Volodymyr Masliy Dec 11 '20 at 13:55

4 Answers4

6

Here is one that does the pop-up notifications. It will work from the command line, and even works in cron jobs.

The simplest way to use it is like so:

echo 'notify-send "FINISH THAT MIDNIGHT PROGRAM"' | at 20:00 

(Thank you, @M. Becerra)

It presents a pop-up in the upper right of all the desktops but without command-line parameters it is silent and goes away in just a few seconds, so here is a good article that explains the high points:

Gnome Desktop Notifications Specification

It can make noises if necessary, for instance.

SDsolar
  • 3,239
  • Also, if you need to run it in time relative to now, to can do something like this: echo 'notify-send "FINISH THAT MIDNIGHT PROGRAM"' | at \date -d '+1 minute' '+%H:%M'` ` – Volodymyr Masliy Dec 11 '20 at 14:43
  • Can I schedule something on a daily basis, again using command line, as above? – Marinos An Sep 20 '22 at 08:59
1

There is a program called xpad that works from the command line and from the GUI. Install it like this:

sudo apt install xpad

Then to run it, type

xpad

It pops up a yellow sticky-note-like window so I can keep that on-screen to remind me to call the boss when I get back, or to finish something I was working on.

It can be locked to the taskbar in case it needs to be minimized. Also, when closed entirely, it comes back with the text intact. That's a plus.

Looks like it will be useful.

But I still need something that will pop up and interrupt me at a set time, whether as a one-off or as a daily cron.

SDsolar
  • 3,239
0

A utility program that will pop-up reminders is Day Planner (http://www.day-planner.org)

The developer's web site states: "Day Planner is a program designed to help you easily plan and manage your time. It can manage appointments, birthdays and more and makes sure you remember your appointments by displaying reminders."

CentaurusA
  • 2,702
0

Xterm can show a dingy little black reminder window... but it stays up until you close it, unlike notify-send.

This one-liner reads a line from the terminal, then displays the reminder in xterm after sleeping for ten minutes.

$ read -p 'reminder? ' e;e=`printf %q "$e"`; sleep $((60*10)) ; xterm -e bash -c "read -p $e"

Here's a bash one-liner using ebay-alarm

$ ebay-alarm 10 min -- xterm -e bash -c "read -p `printf "%q" "$(read -p 'reminder? ' e;echo $e)"`"

It's hard to read because the one-liner, uses this method: xterm -e bash -c "script" , but the reminder message has to be read, then escaped with printf.

marinara
  • 435