Back to writing

tenofy - bash customizable desktop timer

A simple Bash script to set a desktop notification timer with custom duration and message.

5 min read · Aug 27, 2025
Photo by Julian Hochgesang

Description

tenofy is a Bash script that sets a desktop notification timer with a custom duration and message. It runs silently in the background and uses notify-send to display a notification when the timer ends.

Key features

Installation

  1. Save the script as tenofy.
  2. Make it executable:
    chmod +x tenofy
  3. (Optional) Move it to a folder in your $PATH:
    sudo mv tenofy /usr/local/bin/
  4. Ensure notify-send is installed (part of libnotify on most Linux distributions):
    sudo apt install libnotify-bin # For Debian/Ubuntu
    sudo dnf install libnotify # For Fedora
    sudo pacman -S libnotify # For Arch

Usage

General format

tenofy -t <duration> -m <message>

Options

If arguments are not provided, the script will ask for duration and message interactively.

Examples

  1. Run with full arguments
    tenofy -t "1h 10m 50s" -m "This is the message"
  2. Quick 5-minute break timer
    tenofy -t "5m" -m "Break time is over!"
  3. Interactive mode (no arguments, script will prompt)
    tenofy

How it works

  1. The script parses -t and -m arguments or prompts for them if missing.
  2. It validates and formats the duration (ensures proper spacing between hours, minutes, seconds).
  3. The timer runs in a background subshell using sleep.
  4. When the timer expires, it triggers a notify-send desktop notification with the specified message.
  5. Meanwhile, the script immediately returns control to the terminal so you can continue working.

Input validation

License

Free to use, modify, and distribute.