playtime
v1.0.1
Published
A command line tool for earning and spending your leisure time.
Downloads
8
Maintainers
Readme
Playtime
A command line tool for earning and spending your leisure time. Spend some time doing a more "virtuous" task (e.g. study Chinese for 30 minutes or work on the book for 2 hours) and convert that into minutes you can use later to do something a little less "productive" (like playing computer games or binge watching that new series).
Usage
$ npm install -g playtime
$ playtime COMMAND
running command...
$ playtime (-v|--version|version)
playtime/0.0.1 darwin-x64 node-v14.7.0
$ playtime --help [COMMAND]
USAGE
$ playtime COMMAND
...
Commands
playtime add
Add time spent on an activity in order to earn play time.
$ playtime add
# You'll be prompted to enter a time source and amount of time spent.
> 5 minutes added. 25 minutes of play time now available.
See code: src/commands/add.ts
playtime use
Use play time that you've previously earned.
$ playtime use
# You'll be prompted to enter the time to use
> 5 minutes used. 20 minutes remaining.
See code: src/commands/add.ts
playtime ls
Show how much playtime you've previously earned.
$ playtime ls
> 5 minutes of play time available
See code: src/commands/add.ts
Configuration
Config Directory
The default config directory is ~/.playtime/
. You can set a custom directory by adding the following
to your shell config:
PLAYTIME_DIR=/whatever/path/you/like
Custom times / time modifiers
By default the times available are 25 minutes, 50 minutes (both inspired by the Pomodoro Technique), and 90 minutes (inspired by Cal Newport's Deep Work). The 90 minutes time has a modifier of 1.5 applied, so an extra 50% of play time is awarded.
You can add custom times (with optional modifiers) by editing the file data.json
in the config
directory (see the Config Directory section above for more info). You can add
a customTimes
field to the json with an array of objects containing a minutes
field and an optional
modifier
field. E.g.
{
"version":1,
"availableTime":17,
"timeSources":[{"name":"Study Spanish","modifier":0.2}],
"customTimes": [
{ "minutes": 30 },
{ "minutes": 60, "modifier": 1.2 }
]
}
Inspiration / Concept
Not surprisingly, this app was written on New Year's Eve as I reflected on some of my habits in 2020. Two in particular stuck out. The first was that I was rarely spending my time doing "deep work". Some of this was to blame on externalities - working from home full-time, adapting to having a first child, my day job evolving into more of a management role, etc. - but the biggest difficulty I could identify was that I rarely have a good trigger to start on deep work. When it comes down to the small, well-defined, surface level task vs the large, ill-defined deep work, the former tends to be the default option.
The second issue, was much simpler - I'm really bad at moderating my leisure time! While it's not bad enough to impact my relationships or work life, it does mean that when it comes to a choice between working on a cool side project or playing that new video game, the latter tends to win. I didn't want to quit playing games, and I didn't want to arbitrarily limit myself (I've tried this in the past and it didn't stick), rather I wanted to find a way to bring some sort of balance to how I spend my time.
The objective then of playtime
is to pit these two issues against each other in the hope of solving both.
Do deep work, enter it into playtime
, and it gets transformed into time you can use later for
your leisure activities! It's still a somewhat arbitrary cap, but in the past I've found that systemising
habits in this way makes me more likely to stick to them. I can't speak to it's efficiency just yet,
but I'm hoping I can revisit this sentence in a few months and update it with a postive outcome!
Development
Releasing
Currently releasing is a manual process:
- Create a release branch from
main
- Run
npm publish
- Merge the branch back into
main
(the only change should be the version number)