Making The Ultimate Habit trigger alarm system for your linux Computer.

If you wish to hack with me to make your own simple habit trigger alarm system then please read on:

Let us hack in steps.

Open your command shell — ctrl+alt+T

Type this in your shell :

DISPLAY=:0.0 zenity info — text=”Do your habits”

now type in this :

at now << EOF
DISPLAY=:0.0 zenity — info — text=””

For this project , create a new folder called habits.

cd habits


add below command to :

at now << EOF
DISPLAY=:0.0 zenity — info — text=””

go to command shell :


now edit so that it has below command :

at now + 1 minute << EOF
DISPLAY=:0.0 zenity — info — text=””

Now replace (now+1 minute) with the actual time by looking at your system clock , add 1 minute to your current time.

edit as below :

at<your current time + 1 minute> << EOF
DISPLAY=:0.0 zenity — info — text=””

Now Think about what time you wish to get the trigger for your habits?

In my case — I want a trigger alarm at 13:20 to go to my team standup meeting.

you decide your time . we will now add the time , command in your bashrc file.

All commands added in .bashrc file are executed the moment you open a new terminal on your computer.

open your .bashrc file to edit it

cd && gedit .bashrc

add this line to your bashrc :

at 13:30 << EOF
DISPLAY=:0.0 zenity — info — text=””

Test whether the command added to .bashrc by editing the time above to the next minute of your current time. open the command shell so all commands in bashrc are executed.

Now instead of zenity modal boxes that showup , let us open gtk windows for more flexibility to add features in the future.

add this to

at now <<EOF
DISPLAY=:0.0 python /home/user/code/python/

create with below code:

import gi
import time
gi.require_version(“Gtk”, “3.0”)
from gi.repository import Gtk
def showAlert ():

window = Gtk.Window(title=”Hello World”)

window.connect(“destroy”, Gtk.main_quit)

showAlert ()

check if adding in bashrc displays the boxes twice.

add to crontab =e

20 13 * * * sh /home/user/code/python/

your should look like this:

DISPLAY=:0.0 python /home/user/code/python/

In case you want a simpler setup and it is ok if the triggers happen only after you open the command prompt atleast once, then:

just add this to your .bashrc file :

at 12:00 <<EOF
DISPLAY=:0.0 python /home/user/code/python/
at 18:20 <<EOF
DISPLAY=:0.0 python /home/user/code/python/

The .bashrc file is called whenever you open your terminal.

so if you open terminal multiple times — multiple trigger windows will be open for you.

All feedback , comments are heartily welcome.

Programmer and Entrepreneur.

Programmer and Entrepreneur.