Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timer

cli timer application.
i made this because i was tired of searching 'X timer' online :)

Usage

timer <duration>

Time Format

The duration is built using a combination of numbers and time suffixes.

You can combine multiple suffixes to create precise timers (e.g. 1h30m5s).

Spaces between numbers and suffixes are ignored.

Supported suffixes:

  • d : Days
  • h : Hours
  • m : Minutes
  • s : Seconds
  • ms : Milliseconds

The ordering of time units does not matter.

Examples

# 1 hour and 30 minutes
timer 1h30m

# 45 seconds
timer 45s

# 1 day, 12 hours, and 500 milliseconds
timer 1d12h500ms

Press q to exit the application while the timer is running.

When the timer ends, press any key to dismiss the sound (if enabled) and exit.


Download

Arch Linux pkgbuilds exist at: pkgbuilds/

pre-built binaries for Linux, mac, and Windows are also released here

Optional requirements on Linux:

  • libnotify required for desktop notifications setting.

Audio playback setting require one of the following:

  • PipeWire (pw-play)
  • PulseAudio (paplay)
  • ALSA (aplay)

Config

The config is stored in:

  • Linux/Unix-likes: ~/.config/torkelicious-timer/ttimer.conf

  • macOS: ~/Library/Application Support/torkelicious-timer/ttimer.conf

  • Windows: %APPDATA%\torkelicious-timer\ttimer.conf

If the config file does not exist, it will be auto-created.

The configuration file uses a simple Key = Value syntax.

Empty lines and lines starting with # are ignored.

Options

SoundPath (String, default: empty)

The absolute or relative path to the audio file you want to play when the timer ends.

If PlayAudio is enabled but this path is empty or invalid, the app will output an error. Either disable PlayAudio or set a valid path.

SendNotification (Boolean, default: true)

Set to true (or 1) to send a desktop notification when the timer ends.

PlayAudio (Boolean, default: true)

Set to true (or 1) to enable audio playback when the timer ends.

LoopAudio (Boolean, default: true)

Set to true (or 1) to continuously loop the audio until you press any key in the console.

Set to false to play the audio file once.

Example

# my configuration file

# Path to the sound
SoundPath = /home/user/Music/alarm.wav

# Enable or disable desktop notifications (true/false or 1/0)
SendNotification = true

# Audio settings
PlayAudio = true
LoopAudio = true

About

A simple command-line timer application

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages