Command-line Pomodoro Timer

Overview

pomosh

Command-line Pomodoro Timer written in Rust


Pomosh is a command-line pomodoro timer written in Rust that (supposedly) help you focus on your task. If you didn't know already, the name pomosh is a mixture of these two terms: pomodoro and shell.

Pomodoro technique?

Here are the basic steps of the pomodoro technique:

  1. Decide the task to focus on.
  2. Set the timer (typically 25 minutes).
  3. Work on the task.
  4. Take a short break when the timer goes off (typically 5-10 minutes).
  5. Repeat steps 2 to 4.
  6. After four pomodoro sessions, take a long break (typically 20-30 minutes). After the long break, you can choose a new task to work on or continue with the same task and repeat from step 2.

Typical pomodoro intervals are 25/5 (25 minutes on, 5 minutes off), and 50/10.

Installation

Build from source

First, install rustup to get the rust compiler using curl https://sh.rustup.rs -sSf | sh -s. Then,

$ git clone https://github.com/img9417/pomosh
$ cd pomosh
$ cargo build --release

$ ./target/release/pomosh

Homebrew

$ brew tap img9417/pomosh
$ brew install pomosh

To update, run

$ brew update
$ brew upgrade pomosh

Usage

Usage: pomosh [OPTIONS]

Options:
  -p, --preset <1|2>  Preset pomodoro (focus/break/long break): 1) 25/5/10, 2) 50/10/20
  -s, --style <1|2>   Configure timer text font
                       1) Univers (*default)
                       2) Yuanqing
  -m, --mute          Disable session/break complete chime
  -h, --help          Print help
  -V, --version       Print version

You can run the command pomosh to configure the focus, short break, and long break durations.

Focus duration (5-90 minutes): 50
Short break duration (5-90 minutes): 10
Long break duration (5-90 minutes): 20

Before your session starts, you can double check your configuration.

Focus duration: 60 mins
Break duration: 10 mins
Long Break duration: 20 mins
Chime: enabled
Start the session? (y/N): Y

Preset

pomosh comes with two preset configurations (Focus duration / Short break / Long break):

  1. 25/5/10
  2. 50/10/20

If you want to run one of the presets, use --preset=<OPTION>.

$ pomosh --preset=1 # runs 25/5/10
$ pomosh --preset=2 # runs 50/10/20

Style

You can use --style=<1|2> flag to configure different text styles for the timer.

Univers

$ pomosh # default style

$ pomosh --style=1 # same as above

Yuanqing

$ pomosh --style=2

Chime

The chime is enabled by default. If you want to disable it, pass --mute option.

$ pomosh --mute

$ pomosh --preset=1 --mute # runs the 25/5/10 preset with no chime

When the session begins, you'll see these notations at the top:

📕 â—ģ â—ģ â—ģ  (r1.1)
  • 📕 -> current pomodoro session
  • â—ģ -> session not started
  • â—ŧ -> on short break
  • (r1.1) -> round 1 pomodoro 1

So on the 4th session, the notations will look like the below:

📕 📗 📘 📙  (r1.4)

Each book represents the pomodoro session.

You might also like...
A command line progress reporting library for Rust
A command line progress reporting library for Rust

indicatif Documentation A Rust library for indicating progress in command line applications to users. This currently primarily provides progress bars

Low-level Rust library for implementing terminal command line interface, like in embedded systems.

Terminal CLI Need to build an interactive command prompt, with commands, properties and with full autocomplete? This is for you. Example, output only

⚡ī¸ Lightning-fast and minimal calendar command line. Written in Rust đŸĻ€
⚡ī¸ Lightning-fast and minimal calendar command line. Written in Rust đŸĻ€

⚡ī¸ Lightning-fast and minimal calendar command line. It's similar to cal. Written in Rust đŸĻ€

Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.

paleatra v.0.0.1 Command-Line program that takes an image and produces the copy of the image with a thin frame and palette made of the 10 most frequen

parse command-line arguments into a hashmap and vec of positional args

parse command-line arguments into a hashmap and vec of positional args This library doesn't populate custom structs, format help messages, or convert types.

A tactics trainer for the command line
A tactics trainer for the command line

Chess Tactics CLI Practice some chess tactics in your terminal while you wait for your code to compile. Fetches tactics from this tactics API. Built W

Cork is a simple command-line calculator, mainly targeted towards people who deal with hex numbers
Cork is a simple command-line calculator, mainly targeted towards people who deal with hex numbers

Cork is a simple command-line calculator, mainly targeted towards people who deal with hex numbers. It deals only with integer arithmetic. Expressions may involve mixed bases (limited to decimal, hexadecimal, octal and binary numbers). The global output format may be set to a particular radix - by default it is hex.

A small command-line application to view images from the terminal written in Rust.
A small command-line application to view images from the terminal written in Rust.

A small command-line application to view images from the terminal written in Rust. It is basically the front-end of viuer

belt is a command line app that can show your time from a list of selected time zones

A CLI app to show your time from a list of selected time zones, and a rust lib to parse dates in string formats that are commonly used.

Comments
  • Default settings?

    Default settings?

    Should I add a default setting so that you don't have to type in all the configurations?

    1. 25 focus, 5 break, 10 long break, chime enabled
    2. 50 focus, 10 break, 20 long break, chime enabled
    3. custom
    question 
    opened by img9417 1
  • for the break, start-end time duration gets updated every time

    for the break, start-end time duration gets updated every time

    the duration must be fixed so that one knows when the break started and when it should end. But after every minute, it updates the duration.

    12:00-12:05 -> 12:01-12:06 -> 12:02-12:07 etc...

    bug 
    opened by img9417 0
  • Command line options?

    Command line options?

    Thinking about adding command line options to disable audio and the long break instead of asking the user at the beginning.

    $ pomosh --disable-audio --disable-lbreak
    

    or

    $ pomosh --audio=false =lbreak=false
    
    question 
    opened by img9417 0
Releases(v0.1.5)
Owner
Jii
a web dev interested in productivity.
Jii
JiaShiwen 12 Nov 5, 2022
Small command-line tool to switch monitor inputs from command line

swmon Small command-line tool to switch monitor inputs from command line Installation git clone https://github.com/cr1901/swmon cargo install --path .

William D. Jones 5 Aug 20, 2022
TimeKnight is a neat little TUI-based timer app I use in conjunction with a task tracker

TimeKnight is a neat little TUI-based timer app I use in conjunction with a task tracker. It's kind of a secret sauce for productivity (particularly if you have ADHD or have a ridiculously overactive brain).

Monomadic 1 Feb 8, 2022
A clock app in terminal written in Rust, supports local clock, timer and stopwatch.

clock-tui (tclock) A clock app in terminal. It support the following modes: Clock Timer Stopwatch Countdown Usage Install Install excutable by cargo:

Jimmy 14 Dec 20, 2022
Command-line HTTP client for sending a POST request to specified URI on each stdin line.

line2httppost Simple tool to read lines from stdin and post each line as separate POST request to a specified URL (TCP connection is reused though). G

Vitaly Shukela 3 Jan 3, 2023
Pink is a command-line tool inspired by the Unix man command.

Pink is a command-line tool inspired by the Unix man command. It displays custom-formatted text pages in the terminal using a subset of HTML-like tags.

null 3 Nov 2, 2023
Checkline: checkbox line picker for stdin line input

checkline is a Unix command line interface (CLI) terminal user interface (TUI) that prompts you to check each line of stdin, to pick each line to output to stdout

SixArm 4 Dec 4, 2022
A full featured, fast Command Line Argument Parser for Rust

clap Command Line Argument Parser for Rust It is a simple-to-use, efficient, and full-featured library for parsing command line arguments and subcomma

null 10.4k Jan 10, 2023
Docopt for Rust (command line argument parser).

THIS CRATE IS UNMAINTAINED This crate is unlikely to see significant future evolution. The primary reason to choose this crate for a new project is if

null 743 Jan 1, 2023
Parse command line arguments by defining a struct.

StructOpt Parse command line arguments by defining a struct. It combines clap with custom derive. Documentation Find it on Docs.rs. You can also check

Guillaume P. 2.6k Jan 5, 2023