Giter Site home page Giter Site logo

pomo's Introduction

pomo.sh

This is a tiny fork of pomo.sh, altered to use terminal-notifier for notification on macOS.

pomo.sh is a simple Pomodoro timer written in bash with minimal dependencies. It is designed to be easy to use from the command-line and integrates nicely into status bar such as xmobar.

Installation

None necessary. Either place pomo.sh on your PATH or run it by specifying the full path.

Usage

pomo.sh [-h] [start | stop | pause | restart | clock | notify | usage]

Options:

-h
Print usage message.

Actions:

start
Start Pomodoro timer.
stop
Stop Pomodoro timer.
pause
Pause Pomodoro timer.
restart
Restart a paused Pomodoro timer.
clock
Print how much time (minutes and seconds) is remaining in the current Pomodoro cycle. A prefix of B indicates a break period, a prefix of W indicates a work period and a prefix of P indicates the current period is paused.
notify
Raise a notification at the end of every Pomodoro work and break block (requires notify-send). Note that this action (unlike all others) does not terminate and is best run in the background.
usage
Print this usage message.

Environment variables:

POMO_FILE
Location of the Pomodoro file used to store the duration of the Pomodoro period (mostly using timestamps). Multiple Pomodoro timers can be run by using different files. Default: $HOME/.local/share/pomo.
POMO_WORK_TIME
Duration of the work period in minutes. Default: 25.
POMO_BREAK_TIME
Duration of the break period in minutes. Default: 5.

Examples

To start a new Pomodoro session, pause and stop a running Pomodoro session respectively:

$ pomo.sh start
$ pomo.sh pause
$ pomo.sh stop

To see how much time is left in the current Pomodoro block:

$ pomo.sh clock

pomo.sh can also send notifications about the end of work and break blocks using terminal-notifier. This involves pomo.sh sleeping until the end of a block and so is best run in the background:

$ pomo.sh notify &

The clock command is ideal for running from inside xmobar, e.g. in the xmobar configuration file:

Config {
    commands = [
        -- rest of commands
        , Run Com "pomo.sh" ["clock"] "pomo" 10"
        ]
    -- rest of config
}

The output of the clock command can then be inserted into the xmobar template using %pomo%.

Dependencies

bash, GNU coreutils (cat, cut, date, printf, sleep, stat, touch, wc). The notify action also requires terminal-notifier.

License

MIT.

See also

Pymodoro contains many more features but I wanted something a little simpler.

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.