Workflow for notifications in i3wm

Since I am currently brushing up on my Linux skills, I have rediscovered the usefulness of crond. I have found a neat little trick that definitely have been a some sort of productivity booster.

I have finished setting up a new workstation to fully embrace my favourite way of doing things -- minimally. I have invested some time to install and configure i3 with some Gnome3 services. It could work better, but really the most exciting thing for me is to finally go back to using i3wm day to day for work (as it is still by far, the most comfortable DE for working with multiple screens, for me at least, and I have been using it for some time now).

Having that in mind, I have a pretty minimal setup when it comes to notifications.I tend not to allow any running software to distract me while I work. Which opens up a great opportunity for having just the notifications that really matter!

Notifications from crontab

The key to the trick isn't really clever, but I guess that it might count as inspiration for others to use it for more sophisticated things. Still, it is - I think - a good way of showing that the old tools can be used in new ways, even on desktop.

My setup involves using zenity but I guess there are other programs that could do the job just fine. The tricky part for running zenity is the fact that we need to tell it which DISPLAY we have in mind when showing the notification. Luckily, there's xrandr to help here, but in the general case you would probably want to use the DISPLAY=:0.

# Example notification that I use, for having breaks from the screen more often
*/45 9-16 * * * DISPLAY=:0 /usr/bin/zenity --notification --text="Hey! Get a break from the screen :)"

which, to translate from cron to human, is just saying the text every 45 minutes from 9am up until 4pm.

Other uses I can think of:

Consider commenting via e-mail