I’ve been suffering from distraction lately, so in addition to editing my /etc/hosts file so that I can’t visit my distraction sites of preference, I’ve gone back to using a Pomodoro timer via org-pomodoro.
Let’s look at how I set this up.
Note: I use Hyprland and Fedora. There may be some nuance when it comes to notifications in your OS and how you play sound.
Adding org-pomodoro to Doom
First find your init.el file which should be at ~/.config/doom/init.el and search for instances of org. In mine I had two instances, which could be a problem according to the docs and the instructions alongside doom doctor.
org ; organize your plain life in plain text
(org +pandoc) ; org and pandocFirst I’ve enabled org then it was enabled again along with pandoc. Instead we’ll go with the expected one line to enable org, pandoc and org-pomodoro.
(org +pandoc +pomodoro) ; org, pandoc, pomodoroThen we can adjust our configuration in config.el which would let us assign custom intervals for work and rest sessions. I’ve left mine with the default settings.
(after! org-pomodoro
(setq org-pomodoro-length 25
org-pomodoro-short-break-length 5
org-pomodoro-long-break-length 15))Once that’s done you can press SPC h r r to reload Doom. You’ll also need to use doom sync from your terminal as we’ve added a module and it needs to be fully installed. I always quit it as well and then check to see if my latest configuration tweak is working.
Getting Sounds Working
To add a bit of whimsy I grabbed some sound effects focusing on retro game sounds for my timer. To get these setup you need to place the sounds somewhere that Doom can access them. I went with ~/sounds/ as the directory to store them in. Then tell Doom when to use them, and which file should be played for each interaction.
Then we modify our configuration above to play our sounds. I renamed the retro game sounds so their names matched the function I wanted them to signify.
(after! org-pomodoro
(setq org-pomodoro-length 25
org-pomodoro-short-break-length 5
org-pomodoro-long-break-length 15
;; external player is most reliable on Linux/Hyprland
org-pomodoro-audio-player "paplay"
;; Your sound files
org-pomodoro-finished-sound "~/sounds/pomodoro-over.wav"
org-pomodoro-short-break-sound "~/sounds/break.wav"
org-pomodoro-long-break-sound "~/sounds/long-break.wav"
org-pomodoro-finished-sound-p t
org-pomodoro-short-break-sound-p t
org-pomodoro-long-break-sound-p t))If you want to configure more sounds you can find their values, along with all the configuration options, in org-pomodoro.el. You can customize how many pomodoro cycles get you a long break, how long each pomodoro is, and every important part of org-pomodoro.
One week in, I’m getting more done again and staying focused.
Leave a Reply