Skip to content

Systray icon to know the time left until the end of the work day

License

Notifications You must be signed in to change notification settings

ismtabo/time-left

Repository files navigation

Time left ⏲

GoDoc Go Report Card

This is a simple countdown timer that can be used to track the time left until the end of the work day.

Screenshot

Usage

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.

Screenshot

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.

Options

The following options are available:

  -c, --config string   The path to the configuration file (default "$HOME/.config/time-left/config.yaml")

Installation

Caveat: Remember to create configuration file before running the script. See Configuration for more information.

Requirements

Readmore about systray requirements here.

Using go get

To install this script, simply run the following command:

go install github.com/ismtabo/time-left@latest

Source

To install this script, simply clone the repository and build the binary:

git clone
cd time-left
make build

Configuration

The script can be configured by editing the config.yaml file in your XDG config directory ($HOME/.config/time-left/config.yaml).

Configuration Properties

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.

Contributing

To contribute to this project, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgements

This project was inspired by the need to track the time left until the end of the work day.

Contributors

Footnotes

  1. Duration strings: see more time.ParseDuration. 2 3 4

About

Systray icon to know the time left until the end of the work day

Resources

License

Stars

Watchers

Forks

Packages

No packages published