GithubHelp home page GithubHelp logo

timer's Introduction

TIMER

simple cli timer written in C++

Once a timer is set, the process is supposed to run in the background. Every subsequent call of the program will share information with the first call.

As soon as a timer ends, the system beeps

SYNOPSIS

How to set a timer

timer --set time [name]

time is measured in seconds.

the following shorthands can be used (all case insensitive):

  • H, hours
  • M, minutes
  • pomodoro

for instance:

timer --set 1H next_meeting

A timer named next_meeting will notify you in 1H.

Will default to 25 minutes, then run for 5 minutes again. The name of the timer will have "work" or "rest" appended respectively. See Pomodoro technique for more info.

for instance:

timer --set pomodoro

Stop reading this message and start working. You have 25 minutes to
get your shit done. If you're good you can slack 5 minutes, later.

How to query a timer

timer [countdownname]

for instance:

timer next_meeting

next_meeting: 52:00

with no arguments it will display all of them:

timer

next_meeting: 52:00
pomodoro: 17:23

Examples

displaying timers in i3status

Run the following script as a wrapper for i3status itself (see the official documentation).

i3status | while :
do
        read line
        #xargs will put all the timers in one line
        echo "$(timer | xargs) | $line " || exit 1

done

timer's People

Contributors

dwaas avatar

Watchers

 avatar

Forkers

blockspacer

timer's Issues

Exception on 'set' command

Examples doesn't work

$ ./timer --set 1M test
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> >'
  what():  in option 'set': invalid option value
[1]    16859 abort      ./timer --set 1M test

$ ./timer --set 1H test
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> >'
  what():  in option 'set': invalid option value
[1]    16894 abort      ./timer --set 1H test

./timer --set pomodoro
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> >'
  what():  in option 'set': invalid option value
[1]    16925 abort      ./timer --set pomodoro

No build instruction

Please, add Makefile or at lease write command to complie. Next line works for me:

g++ main.cpp --std=c++11 -lboost_program_options -o timer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.