-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Terminal Timer | ||
|
||
`ttimer` is a simple timer that counts down time left in a terminal window. It will send silent system notifications (on mac, windows, or desktop linux) at 90% and 100% completion of the timer. | ||
|
||
## Duration Timing | ||
|
||
Lets say you want a timer for 3 minutes. Simply enter | ||
|
||
``` | ||
ttimer -t 3 | ||
``` | ||
|
||
and you will start a timer count down like so | ||
|
||
``` | ||
== 3m Timer == | ||
2m55s | ||
``` | ||
|
||
## Parsing Rules | ||
|
||
* All integers less than `100` will be interpretted as minutes | ||
* Any strings fitting a call to `time.ParseDuration` will be interpretted as that duration | ||
* Any strings ending in `a`, `p`, `am`, or `pm` will be interpretted as times | ||
* Any integers greater than `100` will be interpretted as times. E.g. `242` will be interpretted as the next occurence of `2:42` and set to `am` or `pm`, whichever is soonest. | ||
|
||
## Timezone Setting | ||
|
||
The default timezone for time-based timers is `America/Los_Angeles`. It can be changed using the `-z` option | ||
|
||
``` | ||
ttimer -t 9a -z UTC | ||
``` | ||
|
||
Once set, `ttimer` will save the last `-z` option and use it as the default timezone in subsequent runs. | ||
|
||
For reference, the list of official `tz` database timezones can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |