Giter Club home page Giter Club logo

tmux-pomodoro-plus's Introduction

Tmux Pomodoro Plus

Tmux Pomodoro Plus

Incorporate the Pomodoro technique into your tmux setup. Forked from Tmux Pomodoro

๐Ÿ“– Table of Contents

โœจ Features

  • Toggle pomodoro timer on/off and see the countdown in the status bar
  • Upon completion of a pomodoro, see a break countdown in the status bar
  • Desktop alerts for pomodoro and break completion (macOS and Linux only)
  • Customise the pomodoro duration and break times
  • Custom keybindings

๐Ÿ“ท Screenshots

Pomodoro counting down: Image

Pomodoro on a break: Image

Pomodoro timer menu: Image

๐Ÿ“ฆ Installation

  1. Using TPM, add the following line to your ~/.tmux.conf file:
set -g @plugin 'olimorris/tmux-pomodoro-plus'

Note: The above line should be before run '~/.tmux/plugins/tpm/tpm'

  1. Then press prefix + I (capital i, as in Install) to fetch the plugin as per the TPM installation instructions

๐Ÿš€ Usage

Default keybindings

  • <tmux-prefix> p to start a pomodoro
  • <tmux-prefix> P to cancel a pomodoro
  • <tmux-prefix> C-p to open the pomodoro timer menu
  • <tmux-prefix> M-p to set a custom pomodoro timer

Note: The pomodoro timer menu and custom pomodoro input is always <ctrl> + [your start pomodoro key]

Status bar

To incorporate into your status bar:

set -g status-right "#{pomodoro_status}"

๐Ÿ”ง Configuration

The default configuration:

set -g @pomodoro_start 'p'                  # Start a Pomodoro with tmux-prefix + p
set -g @pomodoro_cancel 'P'                 # Cancel a Pomodoro with tmux-prefix key + P

set -g @pomodoro_mins 25                    # The duration of the pomodoro
set -g @pomodoro_break_mins 5               # The duration of the break after the pomodoro

set -g @pomodoro_on " ๐Ÿ…"                   # The formatted output when the pomodoro is running
set -g @pomodoro_complete " โœ…"             # The formatted output when the break is running

set -g @pomodoro_notifications 'off'        # Enable desktop notifications from your terminal
set -g @pomodoro_sound 'off'                # Sound for desktop notifications (Run `ls /System/Library/Sounds` for a list of sounds to use on Mac)

Customising the status line

The output from the plugin can be completely customised to fit in with your status line. For example:

set -g @pomodoro_on "#[fg=$text_red]๐Ÿ… "
set -g @pomodoro_complete "#[fg=$text_green]๐Ÿ… "

๐Ÿ”ฌ How it works

  • Starting a Pomodoro
    • Uses date +%s to get the current timestamp and write to /tmp/pomodoro.txt
    • This allows the app to keep track of the elapsed time
  • Completing a Pomodoro
    • Writes the status of the pomodoro to /tmp/pomodoro_status.txt
    • This allows the app to know what type of notification to send
  • Cancelling a Pomodoro
    • Deletes /tmp/pomodoro.txt
    • Deletes /tmp/pomodoro_status.txt
  • Getting the status of a Pomodoro
    • Countdown: Compares current timestamp (via date +%s) with the start timestamp in /tmp/pomodoro.txt
    • Break: Compares the current timestamp with the start timestamp and adds on the break duration

๐Ÿ‘ Thanks

Thanks to the following people:

  • Wladyslaw Fedorov - For the squashed tomato image
  • basaran - For the awesome pull request to add the linux notifications and the custom input for the pomodoro duration

๐Ÿ“ƒ License

MIT

tmux-pomodoro-plus's People

Contributors

basaran avatar jonaustin avatar olimorris avatar swaroopch avatar

Watchers

 avatar

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.