hi there, i was using strict workflow beeminder for a while, but figured out eventually that using a chrome extension was too distracting when i was just coding, so i wrote a little bash script to run pomodoros offline. i just updated it so that it automatically increments a beeminder “pomodoro” goal after each pomodoro. let me know what you think!
Oh cool! I love bash one-liners. That’s pretty nifty.
I’ve started using notify-send.sh recently for persistent and/or programmatically-cancellable Ubuntu notifications, so I’ll probably drop that in to the loop before and after breaks.
Thanks for sharing!
Nice! I like some command line beeminder goodness! May I suggest putting the config file not directly in the user’s home? The XDG Base Directory Specification has recommendations as to where to put things like this.
Examples can be found in this SO answer:
Also for macOS I think it is a good idea to store the
auth_token in keychain:
thanks @alys, seems like there are some cool notifications in your linked repo! my main goal was to have some kind of “bell” replacement, but i agree that other events might prove useful.
@phi changed the config file to
~/.config/beeminder/.pomrc according to your linked specifications. for the auth_token i don’t have any mac to test it on at the moment and would prefer to keep it os agnostic, but i’ll keep that in mind if i decide to make it work well on mac, thanks.
One of the coolest things about the XDG Base Directory Specification is that it gives control to the user to specify where all the various dotfiles and so forth go via environment variables (with sane defaults).
So I’d like to suggest something like this:
config_folder = os.environ.get('XDG_CONFIG_HOME', os.path.expanduser('~/.config')) config_path = os.path.join(config_folder, 'beeminder/.pomrc')
This lets users override the location of their config folder by exporting the
XDG_CONFIG_HOME environment variable. (It also slightly improves things by taking full advantage of
os.path.expanduser's ability to expand the tilde at the beginning of a longer path, and not just when the tilde is on its own.)