Another Guy with a Computer logo
Observations on life, the world, and computing.

Clock Chimes

Introducing Clock Chimes!

With Clock Chimes, your computer can simulate the hourly chiming of a clock tower.

Clock Chimes is a service for *nix based computers which simulates the chiming of a clock tower. I first experienced this functionality with the menu bar clock found in Mac OS versions 7.5 through version 9.2.2. The menu bar clock included options (pictured below) to play sounds under specific conditions such as:

With the introduction of Mac OS 10, these options were removed.

After a flash of nostalgia and inspiration, I decided to recreate the functionality utilizing a shell script paired with a systemd timer and service.

Image depicting available menu bar configuration options in Mac OS versions 7.5 through 9.2.2.
Image depicting available menu bar configuration options in Mac OS versions 7.5 through 9.2.2.

System Requirements

Clock Chimes has three dependencies: bash, a scheduler and a media player.

Download

Clock Chimes is free to download and use. Documentation and source files are included with the archive and online. The project source and assets are also available at GitHub.

Download Clock Chimes

Installation Instructions

Installation is performed by running the following command within a Terminal application:
bash ./install.sh install

A prompt will inform you once installation has completed.

The installer places a bash script, configuration file and sound files into your home directory.

A systemd timer and service will be registered on computers using systemd.

A cron script will be installed on computers using cron.

Information Icon

See the Default Configuration and Installation Notes sections for information regarding defaults used during service configuration and installation.

See the file manifest page for information regarding where files are installed.

Usage

TLDR

I want to test the script now and hear what it sounds like, how do I do that?

Running the Clock Chimes Ring command will cause a single chime sound to play. Within a Terminal application, run:

clock_chimes.sh -r

More Information

The installer handles all necessary configuration. After the installer completes, no further action is required. With the default configuration, the chimes will sound at the beginning of each hour and thirty minutes past the hour.

Activation occurs when a systemd timer or cron job triggers clock_chimes.sh. The clock_chimes.sh script will determine whether and how many times to play the chime sound. The systemd service file or cron job should be pointed to the clock_chimes.sh script, typically stored in ~/bin or ~/.local/bin. No arguments are required.

To run or test Clock Chimes, run any of the commands shown below.

Run Clock Chimes. Within a Terminal application, run:

clock_chimes.sh

With a default configuration, nothing will appear to happen unless you are running the script at hour or thirty minutes past the hour. See Default Configuration information for details.

To run the Clock Chimes ring command, within a Terminal application, run:

clock_chimes.sh -r

To display the Clock Chimes configuration, within a Terminal application, run:

clock_chimes.sh -c

To test the default Clock Chimes configuration, within a Terminal application, run:

clock_chimes.sh -t

Alert Icon

Note: Press Control z to abort testing. Depending on a number of factors, testing can take a long time. I won't tell anyone you pressed Control z.

Documentation

Full documentation is available at the documentation page and within the source archive.

Other Documentation Quick Links