Skip to content
A bash script alarm clock
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Updated manpage a little Sep 14, 2018
CHANGES Removed 'prefixes' array Sep 14, 2018
LICENSE Fixed LICENSE file, updated README Sep 14, 2018
Makefile Added command-line args for snooze and timeout options Nov 9, 2014


================================================================================  |   James Hendrie (
    2018-09-14  |   README file

    shalarm [OPTION / TIME]

    You'll need a media player of some sort to actually get anything out of this
    script.  I recommend 'mplayer' or something similar.  If you want to use the
    'FORTUNE' option in the config file, you'll also need the fortune program

    You don't really need to install this (it's a shell script), but it makes
    things a little easier if you do.  To do so, as superuser and within the
    root directory to which you've extracted the archive, type 'make install'.

    Similar to the above, except you type 'make uninstall' instead.

    It's just an alarm clock written as a bash script.  Use it however you'd use
    an alarm.  Alarms are typically used to cancel sleep.

    I'd recommend trying it with the --test option before attempting to use this
    in any serious capacity, however.

    NOTE:  All times are in 24-hour format.

    -h or --help:
        Print a help screen

    -v or --version:
        Print version and author info

    -d or --debug:
        Print out some information about what the script is trying to do.

    -t or --test:
        Test out the alarm (HIGHLY RECOMMENDED)

    --snooze N:
        Enable snooze, set snooze length to N seconds

    --timeout N:
        Enable alarm timeout, set timeout limit to N seconds

    shalarm 14
        Set the alarm for 14:00 (2:00 PM).
    shalarm 1430
        Set the alarm for 14:30 (2:30 PM).
    shalarm 143030
        Set the alarm for 9:00 PM.  Just kidding.  14:30:30 (2:30:30 PM).
    shalarm --snooze 300 --timeout 900 07:30
        Set the alarm for 7:30 AM.  Additionally, both snooze and alarm timeout
        are enabled.  When you snooze (the first CTRL-C), the alarm will silence
        itself for 300 seconds (5 minutes).  If left ringing for 900 seconds (15
        minutes), the alarm will terminate itself.

    Configuration files are stored at /etc/shalarm.cfg and
    $HOME/.config/shalarm/shalarm.cfg.  The second file takes precedence over
    the first.  While a configuration file isn't strictly required, it's highly
    recommended that you use it since it contains a couple of things not
    presently supported by command-line arguments.

    Initially the config file is installed to /etc/shalarm.cfg, but the
    user-modifiable version is copied to $HOME/.config/shalarm/shalarm.cfg the
    first time the script is run, including with the --test option.  It's
    probably a good idea to run the test before anything else.

    If you want to use the 'fortune' program when printing a wakeup message,
    set the wakeup message to FORTUNE.  Obviously, the fortune program needs to
    be installed.

This script is licensed under the FreeBSD License (aka, Simplified BSD License).
Check out LICENSE.txt for more info.

    James Hendrie <>
    with contributions from Ilya Pikulin, stormdragon2976 and rellieberman. 
You can’t perform that action at this time.