~dmi3 page

Simple Hackable Pomodoro Timer

Pomodoro Timer Slack Status and Do Not Disturb

There are tons Pomodoro timers out there. But they are either not customizable, or have "Enterprise Architecture" with multiple methods and calls in the source code, making it complicated to quickly make changes. What if want to quickly customize timer for yourself?

You may want to:

So I've created one more Pomodoro timer . Less than 50 lines of *very simple cross-platform 1 Python script. By default, it displays "always on top" window with a timer in window and title.

Source on Github

The code has no options, as its self-explanatory and intended to be hacked and modified to fit your specific vision of how Pomodoro timers should work.

Recipes

Score tasks in Habitica

requests.post('https://habitica.com/api/v3/tasks/'+TASK_ID+'/score/down', headers={'x-api-key': API_TOKEN, 'x-api-user': USER_ID})
  • In complete add following line:
requests.post('https://habitica.com/api/v3/tasks/'+TASK_ID+'/score/up', headers={'x-api-key': API_TOKEN, 'x-api-user': USER_ID})

Set Do Not Disturb in Slack

In start add following line:

requests.get('https://slack.com/api/dnd.setSnooze', params=(('token', xoxp_TOKEN), ('num_minutes', '25')))
  • In complete and cancel add following line:
requests.get('https://slack.com/api/dnd.endSnooze', params=(('token', xoxp_TOKEN),))

Set Slack status to Tomato Emoji

  • In start add following line:
requests.post('https://slack.com/api/users.profile.set', params=(('token', xoxp_TOKEN), ('name','status_emoji'), ('value', ':tomato:')))
  • In complete and cancel add following line:
requests.post('https://slack.com/api/users.profile.set', params=(('token', xoxp_TOKEN), ('name','status_emoji')))

Play sound on completion

  • Install vlc.
  • In complete add following line:
os.system("cvlc /path/to/sound.wav vlc://quit")
# or
os.system("paplay /path/to/sound.wav vlc://quit")

Set Taskbar icon

self.root.tk.call('wm', 'iconphoto', self.root._w, tk.PhotoImage(data="R0lGODlhIAAgAOMIAAAAAHkAAJcDALUhBgBlANM/JAChAPFdQv///////////////////////////////yH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAAgALAAAAAAgACAAAASwEMlJq704622BB0ZofKDIUaQ4fuo5pSIcupK8eu1GkkM/EEDC7oMZeny/oBFQNCKDQmNz+FRKX5+D9lDoFlRIsG+55XrFPfSAvPV+RWH42Fh2q9VLN3LPHwj+AnlefYR+gIJdhX2AgUZ6inuMS5CGjH8BmAGTkJaAmZpOnJ0Cn5uKo6SZJCgfSKilRBc8Pq+qsR2ttKOwHlMArru2vTpLVy7FxifIQzQIyzvN0dLTEhEAOw=="))


  1. And thats kids, how we oldtimers created cross-paltform apps before your fancy node and electron was invented.

If you have anything on your mind, drop me email @tilde.club. Lets talk!
Website design inspired by: