Giter Club home page Giter Club logo

cherrytomato's Introduction

build codecov

CherryTomato

Screenshot

Features

  • Easy to use, flexible Pomodoro Technique timer.
  • Configurable intervals.
  • Notification after time is over.
  • Short and long break (after n tomatoes).
  • Auto stop tomato and break.
  • Tomatoes counter.
  • Switch to tomato when user press stop.
  • Execute custom commands when the timer is started, stopped or changed state.

Requirements

  • Python>=3.6
  • PyQt5

Tested on

  • Arch Linux
  • KDE5
  • Xorg X server
  • FullHD Display
  • Python 3.7, 3.8

Installing

CherryTomato can be used without installation (by executing main.py). However, you can install it.

python3 setup.py install

Arch Linux

Also you can install CherryTomato from AUR:

yaourt -S cherrytomato

Execute custom commands

You can specify custom commands that will be triggered on some events like the timer is started, stopped or changed state.

Commands executed with python subprocess.Popen without shell=True option. It means that you can't use pipes or redirect output. You can read more about this in subprocess documentation.

But if you need pipes and other shell features you can write your own script, place it in filesystem and execute from CherryTomato.

NOTE: Processes started by commands that you executed will not be closed automatically on the CherryTomato exit.

Also, you can pass some info about timer to your custom commands with macros:

  • {tomatoes} - number of completed tomatoes
  • {state} - current timer state ("tomato", "break" or "long_break")

Examples you can see on screenshot.

/opt/scripts/test.sh from screenshot example:

#!/bin/bash

tomatoes=$1
state=$2

if [ $tomatoes -gt 10 ]
then
    # ...
    # greater than 10 logic
    # ...
else
    # ...
    # lesser than 10 logic
    # ...
fi


if [ $state = "tomato" ]
then
    # ...
    # is tomato state logic
    # ...
elif [ $state = "break" ]
then
    # ...
    # is break state logic
    # ...
elif [ $state = "long_break" ]
then
    # ...
    # is long break state logic
    # ...
fi

Another example - you can simply play and pause music on Spotify with commands:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause

Credits

cherrytomato's People

Contributors

yakimka avatar

Watchers

 avatar  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.