Rewind: Quick reminders in Terminal
I was browsing my gists recently and found one I’d totally forgotten about, which is somewhat ironic given its purpose: scheduling short-term reminders with alarms from the Terminal. I posted it about it back in 2016, but eventually it fell into disuse, as a lot of my just-playing-with-an-idea scripts tend to.
This one was actually pretty cool, though, and I’ve started using it again. You just run something like
dontforget to get ready for dinner in 30m in Terminal, and in 30 minutes, you get a reminder in the form of a “ding” and your computer saying “Time to get ready for dinner.” It has LaunchBar integration for large display text.
I don’t know why I ever decided that Bash scripting was the efficient way to write this one. It definitely isn’t. But I stuck with it and updated it a little bit.
You can now use “at 3pm” or “at 10:30am” type strings to set a specific time. The meridian (am or pm) is required. This only works within 24 hours of the current time.
I also added an AppleScript
display dialog if you don’t have the LaunchBar integration enabled. Oh, and for some reason I thought it deserved smarter display of the time, so instead of “in 128 minutes,” it says “in 2 hours 8 minutes”.
Contrary to what I wrote in my original post on this, it will actually work fine if you quit the Terminal session you launched it in (assuming you didn’t force it to run in the foreground, but why would you do that, really?).
This little script really isn’t meant to be used for much beyond a quick reminder within a few hours. I use it when I tell my girlfriend I just need to take care of a quick coding problem I thought of in the evening after I’m supposed to be done for the day. “I’ll be back in 20 minutes, I promise.” When I sit down I run
dontforget to get back to your beautiful girlfriend in 20m and my Mac will make sure I’m not a liar.
You can find the updated script in the gist. Feel free to leave comments there if you think of additions or fixes it needs! By the way, I’m using Fish as my shell these days, but this works fine as long as it has the
bash shebang on the script.