This Bash script creates a visually appealing, centered countdown timer in your terminal window. It features a colorful progress bar and real-time updates.
- Centered display in the terminal window
- Colorful progress bar with gradient effect
- Real-time updates of progress and remaining time
- Customizable duration
- Completion alert with sound
- Bash shell (version 4.0 or later recommended)
- A terminal that supports ANSI escape sequences and Unicode characters
-
Download the script:
git clone [email protected]:seanzamora/bash-pomodoro.git
-
Make the script executable:
chmod +x pomodoro.sh
Run the script with the desired number of minutes as an argument:
./pomodoro.sh <minutes>
For example, to start a 5-minute timer:
./pomodoro.sh 5
You can customize the script by modifying the following variables:
YELLOW
: Change the color of the text (uses ANSI color codes)BG_GRAY
: Change the background color of the progress barblocks
: Modify the Unicode characters used for the progress bar gradient
If the timer is not centered correctly:
- Ensure your terminal window is large enough to display the entire timer.
- Try resizing your terminal window before running the script.
- Check if your terminal fully supports ANSI escape sequences.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the Bash community for providing helpful resources on terminal manipulation