Code Monkey home page Code Monkey logo

polypomo's Introduction

polypomo - a polybar pomodoro widget

Usage

Download or clone this repository, then in polybar add:

; In your bar configuration add
modules-right = <other-modules> polypomo <other-modules>

; and add a polypomo module
[module/polypomo]
type = custom/script

exec = /path/to/polypomo
tail = true

label = %output%
click-left = /path/to/polypomo toggle
click-right = /path/to/polypomo end
click-middle = /path/to/polypomo lock
scroll-up = /path/to/polypomo time +60
scroll-down = /path/to/polypomo time -60

font-0 = fixed:pixelsize=10;1
font-1 = Noto Emoji:scale=15:antialias=false;0

In order to prevent accidental changes to the timer, polypomo starts in locked mode.
Middle click the widget or run polypomo lock to toggle locked state.
You can then scroll-up/down to change time.

If you wish to permanently change the default times start polypomo with --worktime seconds and --breaktime seconds.

if you want your work sessions to be logged, start polypomo with --saveto followed by the path to your database, polypomo will then create a table called sessions and store the date, start and stop time of each work session.

There isn't much else in terms of configuration but if the syntax above is confusing please refer to the polybar configuration wiki page.

Limitations

polypomo is designed to work as a single widget in your polybar.
Running multiple polypomo instances is not a supported configuration but some workarounds are possible.

Fonts

In order to display the icons as shown in the screenshots below, you need to configure a font that includes the Unicode glyphs U+1F345 (๐Ÿ…) and U+1F3D6 (๐Ÿ–). The example above uses the font Noto Emoji from the Noto family of fonts.

About pomodoro technique

While polypomo implements the active -> break -> active pattern it doesn't enforce the longer break after a given number of active sprees.
This is left at the discretion of the user.

Optional dependencies

polypomo makes use of notify-send to send a notification when the timer reaches zero.

Screenshots

pomodoro timer
break timer

License

polypomo is licensed under the MIT license

Troubleshooting

If you are finding that polypomo doesn't start or error messages are visible in polybar, try the following:

  1. Remove polypomo from polybar's configuration
  2. Ensure no polypomo process is active on your system
  3. Open two terminals/consoles and navigate to the polypomo repository
  4. On the first terminal run ./polypomo. You should see some output appearing.
  5. On the second terminal issue one of the polypomo commands listed above. For instance ./polypomo toggle. The output in terminal one should change accordingly.

If an error appears in either case, please submit a bug report with the full output and the steps to reproduce the problem.

To stop polypomo on the first terminal run ./polypomo exit in the second terminal or simply hit Ctrl + C to abort the process.

Received exit request...

If this message appears repeatedly in polybar, you may be running multiple instances of polypomo simultaneously and they are forcing each other to exit. Reconfigure polybar to run only one polypomo instance or see the Limitations section above for possible workarounds.

Alternatively, stop polybar and run the above troubleshooting steps. If manually running polypomo with the two terminal setup works, review your polybar configuration to ensure only one instance of polypomo is launched.

polypomo's People

Contributors

imenyoo2 avatar oreolek avatar unode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

polypomo's Issues

TypeError on timer switch.

image
The error occurs when the "tomato" timer is counting and I execute polypomo end.
When the "tomato" timer is paused, the error don't popup and just changes to the "break" timer

Time adjustment

Hey @unode ... Thanks! this is what I was just looking for ..

Do I have to set the time on the config like ?

exec = /path/to/polypomo --worktime 45

Because the scroll up and down is not working to add or subtract time .. even if I run it on the terminal ...

Sorry I dont know Python and I could not figure out where the time command was

EDIT:
I figure out it was locked that is why the scroll didnt work so if you fist middle click and then scroll it works =P

Does not work with multiple bars

When using this module and starting multiple instances of the same bar (on two different monitors), the module displays "Received exit request" and this switches between the two bars every couple of seconds.

Unicode icons not rendering

Do I have to integrate a special font in polybar to be able to render the tomato icon? As of now everything is working fine, except the display of the icons.

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.