gomodoro/README.md
2024-10-18 09:10:46 -07:00

101 lines
2.6 KiB
Markdown

# Gomodoro
Gomodoro is a customizable Pomodoro timer written in Go. It allows you to set focus and break intervals, and run custom shell commands at the start and end of each focus period, as well as at the end of each interval. The application can be run in fullscreen mode and provides a visual progress bar to track your focus and break times.
## Features
- Customizable focus and break durations
- Customizable number of intervals
- Ability to run shell commands at the start and end of focus periods, and at the end of each interval
- Fullscreen mode for distraction-free focus
- Visual progress bar with customizable colors
## Installation
To install Gomodoro, you need to have Go installed on your machine. Then, you can clone the repository and build the application:
```sh
git clone https://github.com/iamthefij/gomodoro.git
cd gomodoro
make build
```
## Usage
You can run Gomodoro from the command line with various options to customize your Pomodoro sessions.
### Command Line Options
- `--on-focus-start`: Command(s) to run when focus starts
- `--on-focus-end`: Command(s) to run when focus ends
- `--on-interval-end`: Command(s) to run when any interval ends
- `--fullscreen`: Enable fullscreen mode
- `--focus`: Focus time duration (default prompt for input)
- `--break`: Break time duration (default prompt for input)
- `--intervals`: Number of intervals (default prompt for input)
- `--color-left`: Left color for progress bar (default: `#ffdd57`)
- `--color-right`: Right color for progress bar (default: `#57ddff`)
- `--version`: Show version
### Examples
#### Basic Usage
Run Gomodoro and follow the prompts to enter your Pomodoro settings:
```sh
./gomodoro
```
#### Set Focus and Break Durations
Set focus time to 25 minutes and break time to 5 minutes:
```sh
./gomodoro --focus=25m --break=5m
```
#### Set Number of Intervals
Set the number of intervals to 4:
```sh
./gomodoro --intervals=4
```
#### Run Commands on Focus Start and End
Run a command when focus starts and another when focus ends:
```sh
./gomodoro --on-focus-start="echo Focus started" --on-focus-end="echo Focus ended"
```
#### Fullscreen Mode
Run Gomodoro in fullscreen mode:
```sh
./gomodoro --fullscreen
```
#### Custom Progress Bar Colors
Set custom colors for the progress bar:
```sh
./gomodoro --color-left="#ff0000" --color-right="#00ff00"
```
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
## Author
Gomodoro is developed by [iamthefij](https://github.com/iamthefij).