This is a simple countdown timer that can be used to track the time left until the end of the work day.
To use this timer, simply run the script and it will display the time left until the end of the work day.
time-left [options]
A systray icon will appear in your system tray. Click on it to see the time left until the end of the work day.
This script can be used to track the time left until the end of the work day. It shows the time left until the end of the work day in the system tray, and the end of the work day. It can be configured to start at a specific time and to last for a specific duration. It can also be configured to take a rest time. See Configuration for more information.
In addition, by clicking the "Rest" button, the script will add the rest time to the end of the work day. Use the "Reload" button to reload the configuration file and the "Quit" button to close the program.
The following options are available:
-c, --config string The path to the configuration file (default "$HOME/.config/time-left/config.yaml")
Caveat: Remember to create configuration file before running the script. See Configuration for more information.
Readmore about systray requirements here.
To install this script, simply run the following command:
go install github.com/ismtabo/time-left@latest
To install this script, simply clone the repository and build the binary:
git clone
cd time-left
make build
The script can be configured by editing the config.yaml
file in your XDG config directory ($HOME/.config/time-left/config.yaml
).
Property | Description | Required | Example | Default value |
---|---|---|---|---|
start |
The time when the work day starts (HH:mm) | Yes | 09:00 |
|
duration |
The duration of the work day as a duration string1 | Yes | 7h30m |
|
rest |
The duration of the rest time as a duration string1 | No | 30m |
1h |
refresh |
The refresh interval as a duration string1 | No | 1s |
30s |
truncate |
The truncate value as a duration string1. This will truncate the time left to the nearest value. See more time.Truncate. | No | 30m |
1m |
Use the following snippet to configure the script:
# The time when the work day starts
start: 09:00
# The duration of the work day as a duration string
duration: 8h
# (Optional) The duration of the rest time as a duration string
rest: 30m
# (Optional) The refresh interval as a duration string
refresh: 30s
# (Optional) The truncate value as a duration string. This will truncate the time left to the nearest value
truncate: 1m
See config.yaml as an example.
To contribute to this project, please fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE.md file for details
This project was inspired by the need to track the time left until the end of the work day.
- getlantern/systray: https://github.com/getlantern/systray
- @ismtabo (author)
Footnotes
-
Duration strings: see more time.ParseDuration. ↩ ↩2 ↩3 ↩4