This guide explains how to create a timer function in the shell/iterm/Terminal using Bash scripting. The function allows you to start a countdown timer with an optional duration. When the timer ends, it plays a sound and announces the end of the timer.
To use the timer function, follow these steps:
- Ensure you have Homebrew installed on your macOS.
- Open the terminal and run the following command to install the required tool: