Meditation Timer

Wed, Dec 2, 2020 4-minute read

A Simple Meditation Timer

Not wanting to pay $5 a month for a timer, and wanting to replace what I have now with something a little more portable, I decided to make this simple little meditation timer that I could get to from any device. There isn’t a lot to say about a simple meditation timer, because, well, it’s simple, and just does a few things (for now.)

Using the Timer

The timer can be found here: tools.analogpixel.org/meditation_timer

  • Minutes : how many minutes do you want the timer to run?
  • Breath Time: how long do you want the in/out cycle of breath to last? at 10, you inhale for 5 seconds, and exhale for 5 seconds, which seem to be the golden standard for breathing.
  • Show Breath : Whether or not to show the breath animation.
  • Start/End Chime: Do you want a chime to start and end your session?
  • Breath Tick: Do you want ticks on the breath in and out? (so you don’t need to stare at the screen)

Fill in what you need, and then click start session. If you want less distractions, then set it to full screen. If you need to restart, just reload the page.

The Downsides of the Web

The downside to using a webpage, is that you are very limited to what you can do. My original cli based timer would put my display to sleep (and continue to run.). The web-version is unable to do that (currently). I do have plans of having configurable webhooks fire for different events, and to have a local webhook listener on my laptop to do things like “put laptop display into sleep mode”. It would also be nice to have it slowly raise the lights when the session is over (a future project).

Another problem with using a browser to do something that could go on for a long time, is the machine wants to go to sleep, which will stop the timer; although for this I did find a library that simulates playing a video in the background to prevent the machine from going to sleep.

Toolification of Meditation Knowledge

Another goal of this project was to convert ideas learned about meditation into a tool to allow me to use those ideas in a consistent way; for example the 5 seconds in and 5 seconds out for breathing is thought to be the sweet spot for meditative breathing, so this tool allows to to visually see that (as the circle recedes into the page imagine your exhale is pushing it back, and the imagine your inhale sucking it back toward you.) . Now that I have the base, as I learn any new techniques, I have a place tool to add them to to build up my practice making it strong, instead of letting knowledge and ideas slip and fade away.

Conversely, if something doesn’t work, I can just remove it from the tool, and move on.

My new theory for building tools

This isn’t a “new” theory, but one that I’m adopting more so I can test more ideas faster.

  • Get a minimum viable product running
    • you just need something you can start using and bolting on to.
  • Start using it daily
  • Add new features based on what you find lacking in the daily use.
  • Don’t add features you don’t need, and don’t update products you don’t use anymore.

This system has been working great for tpl. I started with a bare bones script to create a project, and as I added new project types I added the functionality I needed then instead of trying to add a bunch of unknown functionality up front. This also allowed me to quickly fix and change the architecture of the program as I found better ways to do things (again instead of having a huge code base of unused features that would have needed to be fixed.)

This sure beats the old method of spending a lot of time adding features you “think” you’ll need, only to find out you didn’t understand the requirements, and just wasted a bunch of effort writing throw away code.