Skip to content

⏳ A Bash wrapper around the Timewarrior CLI that aims to improve its usability.

License

Notifications You must be signed in to change notification settings

cheap-glitch/toki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⏳ toki

License Latest release Coverage status

toki () is a Bash wrapper around timew, the Timewarrior CLI.

Features

  • Extra commands
  • Convenient aliases for built-in commands
  • Extended duration syntax (e.g. timew track tag for 1h35m20s)
  • Allows using m as suffix for minutes instead of months
  • Acts on the latest interval by default
  • Notifies of errors when running timew outside of a terminal
  • Thoroughly tested

Installation

Make sure you have installed Timewarrior first.

Note: toki is only compatible with the 1.4.x version of timew

Clone the repo or download the scripts from the latest release, and make sure they're executable (chmod +x <scripts>).

The toki script can be use in place of timew (one character less to type!). Or, if you don't want to retrain your fingers, you can alias timew to toki and get all of its benefits transparently.

External dependencies

The toki-restart commands uses jq to parse JSON, so you need to install jq if you want to use it.

Completion

Source _completion.bash in your bashrc to enable better completion.

Usage

toki is used exactly like timew, with a few additions and differences that are listed below.

Commands that expect an ID (delete, tag, lengthen, etc.) will default to @1 if none is provided.

Extra commands

  • toki-cut: stop tracking and truncate the stopped interval to the closest minute
  • toki-restart: cancel and restart an interval
  • toki-restore: resume tracking of the last interval and automatically fill the gap
  • toki-switch: cut the current interval and starts another

See toki help <command> for more info.

Aliases

  • lengthen: +, extend
  • shorten: -, reduce
  • join: merge
  • track: t, a, add, record
  • continue: restart
  • delete: d, remove

Extended duration syntax

toki adds support for the following duration syntaxes:

  • <minutes>m (the m suffix is treated as minutes instead of months)
  • <hours>h<minutes>
  • <hours>h<minutes>m
  • <hours>h<minutes>m<seconds>
  • <hours>h<minutes>m<seconds>s

Contributing

Contributions are welcomed! Please open an issue before submitting substantial changes.

Related

License

ISC

About

⏳ A Bash wrapper around the Timewarrior CLI that aims to improve its usability.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project