Terminal countdown timer

Overview

Countdown

Screen shot

Usage

Specify duration in go format 1h2m3s.

countdown 25s

Add command with && to run after countdown.

countdown 1m30s && say "Hello, world"

Notify

notify_preview

Key binding

  • p or P: To pause the countdown.
  • c or C: To resume the countdown.
  • Esc or Ctrl+C: To stop the countdown without running next command.

Install

go get github.com/antonmedv/countdown

License

MIT

Credit

Icons made by Freepik from www.flaticon.com
Comments
  • 1h2m3s will be format to 2m3s

    1h2m3s will be format to 2m3s

    https://github.com/antonmedv/countdown/blob/f9011555776dc89f944de398334b555c82b52f25/main.go#L56

    d.Hours() will always return 0, because it is not the origin input

    opened by shaohui10086 4
  • I dont know what to

    I dont know what to "say"...

    c:\users\stingyjack\go\bin\countdown 10s && say "final"
    

    does the countdown, then...

    'say' is not recognized as an internal or external command,
    operable program or batch file.
    

    I'm guessing I need another tool installed for that. What am I missing?

    opened by StingyJack 3
  • Your prompt

    Your prompt

    This isn't really related to countdown, but in the gif on the main page, you have a pretty rad colorful prompt. Any chance you could provide the details on how to accomplish that ;)

    Thanks!

    opened by retr0h 2
  • Added support to notify

    Added support to notify

    This PR closes #20

    New File added:

    • assets/bell.svg => notification icon (downloaded from freepik)

    Edited file:

    • README.md => add notification preview and credit for freepik icon
    • main.go => import beeep and add function notify() detailed below
    func notify(title, body, icon string) {
    	err := beeep.Notify(title, body, icon)
    	if err != nil {
    		panic(err)
    	}
    }
    

    I also call notify() on main()

    func main() {
    	defer notify("Countdown App", "Timer Finished", "assets/bell.svg")
    	...
    }
    
    opened by raffifu 1
  • Feature/kitchen time format

    Feature/kitchen time format

    Use case: During longer meetings, we often say: "Let's have a 10 minute break and meet back at 11:45". Instead of doing them math and say: countdown 9m27s this PR allows to say countdown 11:45AM instead.

    opened by klemmster 0
  • Add Support for Notification

    Add Support for Notification

    opened by raffifu 0
  • adding newline to the end of usage text so the terminal would return …

    adding newline to the end of usage text so the terminal would return …

    …to new line

    before:

    $ countdown
    usage:
    countdown 25s
    countdown 1m50s
    countdown 2h45m50s$
    

    after:

    $ countdown
    usage:
    countdown 25s
    countdown 1m50s
    countdown 2h45m50s
    $
    
    opened by tanelpuhu 0
  • Fix that getting wrong hours from modified duration

    Fix that getting wrong hours from modified duration

    d has been modified, so it does not equal original value. So d.Hours() always returns 0 because the hours part was already subtracted from d.

    h := d / time.Hour
    d -= h * time.Hour
    

    It should use h instead.

    opened by mingrammer 0
  • Config and Message

    Config and Message

    There is no --help, -help, or help to show the usage. A blank command will do it.. but this is easy to implement.

    Additionally this command already sends a notification on finish, it would be trivial to add a custom notification.

    If you do not get to this before I do, ill probably submit a PR to fix this.

    opened by rustysys-dev 0
  • Add keybinding to skip countdown and run next command

    Add keybinding to skip countdown and run next command

    There is already exists keybinding (Esc or Ctrl-C) to stop countdown w/o running next command. It is will be helpful to add keybinding (e.g. q, s or n) to skip countdown (exit with 0 code) and run next command.

    opened by alefbragin 0
  • feature request: please beep on completion

    feature request: please beep on completion

    alternately, if you don't want to make it annoying by default, have it look at COUNTDOWN_ON_ZERO_COMMAND in the environment, so I can do:

    export COUNTDOWN_ON_ZERO_COMMAND='echo -e "\a"'
    

    in my .profile.

    opened by sneak 1
  • automatic resizing of the font

    automatic resizing of the font

    • While the countdown is running and the user decides to change the size of the terminal, the font of the countdown will recenter automatically on the next ticks.
    opened by Timgrau 0
  • Add more units from sleep command

    Add more units from sleep command

    I notice that at least d for days is not supported. I use this occasionally with the sleep command to do stuff like open a link with xdg-open in a couple days. It's also a bit more readable to see 12 days counting down than 288 hours. Not sure if sleep supports bigger units than days, but if it does, it could be good to have those as well. w for weeks should be fairly unambiguous, and if you start using capitals, M could be months.

    opened by Soundtoxin 2
Owner
Anton Medvedev
curl medv.io
Anton Medvedev
Terminal client for SimpleNote

GoNote - Terminal client for SimpleNote GoNote is a simple utility for managing notes in your SimpleNote account. It allows basic operations like crea

Konrad Wąsowicz 55 Nov 22, 2022
gomerge is a tool to quickly bulk merge several pull requests from your terminal.

Gomerge is a tool to quickly enable you to bulk merge Github pull requests from your terminal. The intention of this tool is to simplfy, and eventually automate the merging of github pull requests. This tool should be able to run on most systems.

Cian Gallagher 41 Dec 28, 2022
`tmax` is a powerful tool to help you get terminal cmd directly.

The positioning of tmax is a command line tool with a little artificial intelligence. If you frequently deal with the terminal daily, tmax will greatly improve your work efficiency.

Jeremy 32 Oct 15, 2022
YouTube client on your terminal

MeowTube YouTube client on your terminal Table of Contents About Getting Started Usage Contributing About MeowTube is a CLI (Command Line Interface) t

Abdul Fattah Ikhsan 27 Jul 29, 2022
🎄 A Christmas tree right from your terminal!

ctree ?? A Christmas tree right from your terminal! ?? Demo ⌛ No Refresh Don't want the tree to refresh every 2 seconds? Easy! Just add the --no-refre

Matthew Gleich 39 Dec 20, 2022
progress_bar creates a single customizable progress bar for Linux terminal.

progress_bar Go Progress Bar Features progress_bar creates a single customizable progress bar for Linux terminal. Installation go get -u github.com/er

erman imer 127 Aug 12, 2022
A terminal based typing test.

What A terminal based typing test. Installation Linux sudo curl -L https://github.com/lemnos/tt/releases/download/v0.4.0/tt-linux -o /usr/local/bin/tt

null 424 Dec 28, 2022
Raspberry Pi terminal based activity monitor

pitop Raspberry Pi terminal based activity monitor Yes I know there are plenty of solutions already available, but I wanted to build my own terminal b

Pierre 222 Dec 11, 2022
❓🖼 Find the anime scene by image using your terminal

What Anime CLI ❓ ?? > This application is basically a ?? wrapper around trace.moe PREVIEW Usage ?? Get Anime By Image File ?? what-anime file anime.jp

Ilya Revenko 759 Jan 2, 2023
Terminal stock ticker with live updates and position tracking

Ticker Terminal stock watcher and stock position tracker Features Live stock price quotes Track value of your stock positions Support for multiple cos

Ani Channarasappa 4.4k Jan 8, 2023
lazyhub - Terminal UI Client for GitHub using gocui.

lazyhub - Terminal UI Client for GitHub using gocui.

ryo-ma 170 Dec 14, 2022
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals

Zachary Yedidia 20.9k Jan 7, 2023
Pi-hole data right from your terminal. Live updating view, query history extraction and more!

Pi-CLI Pi-CLI is a command line program used to view data from a Pi-Hole instance directly in your terminal.

Reece Mercer 41 Dec 12, 2022
💻 PTerm | Pretty Terminal Printer A golang module to print pretty text

✨ PTerm is a modern go module to beautify console output. Featuring charts, progressbars, tables, trees, and many more ?? It's completely configurable and 100% cross-platform compatible.

null 3.1k Jan 1, 2023
A collection of terminal-based widgets for richer Golang CLI apps.

Flinch A collection of terminal-based widgets for richer Golang CLI apps. Ships with a library to build your own widgets/TUIs too. Warning: This modul

Liam Galvin 41 Jan 7, 2023
A wrapper around cd and xdg-open to use aliases to directory paths in terminal

CDD - Change directories Dynamically I am a lazy linux user and turns out that basic tab completion wasn't enough for me to navigate through my direct

Navdeep Singh Rathore 16 Dec 15, 2022
Terminal multiplexer inspired by i3

3mux is a terminal multiplexer with out-of-the-box support for search, mouse-controlled scrollback, and i3-like keybindings. Imagine tmux with a small

Aaron Janse 1.7k Dec 28, 2022
A simple terminal UI for Go linters

golintui golintui is a TUI tool that helps you run various kinds of linters with ease and organize its results, with the power of golangci-lint. Cool

Ryo Nakao 76 Jun 9, 2022
A tiny markup language for terminal output. Makes formatting output in CLI apps easier!

tml - Terminal Markup Language A Go module (and standalone binary) to make the output of coloured/formatted text in the terminal easier and more reada

Liam Galvin 705 Dec 14, 2022