Skip to content

tdsh/time-to-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ead0712 · Sep 20, 2019

History

17 Commits
Sep 20, 2019
Aug 18, 2017
Sep 20, 2019
Jan 16, 2018
Sep 20, 2019
Sep 20, 2019
Sep 20, 2019
Jan 16, 2018
Jan 19, 2018
Aug 18, 2017
Aug 18, 2017
Aug 18, 2017
Sep 20, 2019
Sep 20, 2019
Aug 18, 2017
Jan 16, 2018
Jan 16, 2018

Repository files navigation

time-to-go

Build Status

Simple command to trigger an alarm (desktop notification and screen flashing) in specified duration.

Description

time-to-go is a simple command. It accepts a duration to the alarm and when the duration passes, triggers an alarm with desktop notification and screen flashing. It can be used for any miscellaneous purpose, from meditation timer to cooking instant noodle.

Usage

time-to-go

Options: -s, --simple Simple output which doesn't show remained seconds. -h, --help Print this help message. -v, --version Print version information and quit.

Example:

To set alarm 3 minutes 20 seconds.

$ time-to-go 3:20

time-to-go accepts TIME as the below format. When you specify time unit, it must be one of units defined by International System of Units (SI) or units outside the SI. i.e.) second: s, minute: min

45 seconds: 45 s, 45s, .45, :45 3 minutes: 3 min, 3min, 3.00, 3.0, 3. 3:00, 3:0, 3 2 minutes 40 seconds: 2 min 40 s, 2min 40s, 2 40, 2.40, 2:40 1 hours 15 minutes: 1 h 15 min, 1h 15min, 1.15.0, 1.15.00, 1:15:0, 1:15:00 1 hours 20 minutes 30 seconds: 1 h 20 min 30 s, 1h 20min 30s, 1 20 30, 1.20.30, 1:20:30 2 hours 40 seconds: 2 h 40 s, 2h 40s, 2 0 45

Press Ctrl+C to cancel the timer.

Install

time-to-go uses Libnotify. So libnotify and Go bindings go-notify are required.

libnotify

RedHat (Please replace by dnf in Fedora)

$ yum install libnotify-devel

Debian/Ubuntu

$ sudo apt-get install libnotify-dev

To install, use go get:

$ go get -d github.com/tdsh/time-to-go

Contribution

  1. Fork (https://github.com/tdsh/time-to-go/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

tdsh

About

Simple command to trigger an alarm

Resources

Stars

Watchers

Forks

Packages

No packages published