Giter Club home page Giter Club logo

Comments (3)

ferfebles avatar ferfebles commented on July 23, 2024

I can't modify the code to write the number of pomodoros alongside the timer, because... this will not be the "Smallest emacs pomodoro timer (1 char)" that I promise in the title of this minor-mode.

But I think that it's an interesting add on, and I've changed the popup that you see when you put your mouse on the timer character. Now you can see the number of completed pomodoros in the popup.

If you really want to add a (ugly :-) number to this clean mode line minor-mode, It's a trivial change to redtick--propertize, something like the third line in this code:

(defun redtick--propertize (bar bar-color)
  "Propertize BAR with BAR-COLOR, help echo, and click action."
  (propertize (format "%s.%s" redtick--completed-pomodoros bar)
              'face `(:inherit mode-line :foreground ,bar-color)
              'help-echo '(redtick--popup-message redtick--pomodoro-started-at
                                                  redtick--pomodoro-description)
              'pointer 'hand
              'local-map (make-mode-line-mouse-map 'mouse-1 'redtick)))

Please tell us if this code works for you, and thanks for using this!! :-)

from redtick.

se4u avatar se4u commented on July 23, 2024

Thanks for adding the number of poms completed to the popup, that's enough for me.

Thanks again.
Pushpendre

On 03-Nov-2016, at 3:16 PM, ferfebles wrote:

I can't modify the code to write the number of pomodoros alongside the timer, because... this will not be the "Smallest emacs pomodoro timer (1 char)" that I promise in the title of this minor-mode.

But I think that it's an interesting add on, and I've changed the popup that you see when you put your mouse in front of the timer character. Now you can see the number of completed pomodoros in the popup.

If you really want to add a (ugly :-) number to this clean mode line minor-mode, It's a trivial change to redtick--propertize, something like the third line in this code:

(defun redtick--propertize (bar bar-color)
"Propertize BAR with BAR-COLOR, help echo, and click action."
(propertize (format "%s.%s" redtick--completed-pomodoros bar)
'face `(:inherit mode-line :foreground ,bar-color)
'help-echo '(redtick--popup-message redtick--pomodoro-started-at
redtick--pomodoro-description)
'pointer 'hand
'local-map (make-mode-line-mouse-map 'mouse-1 'redtick)))
Please tell us if this code works for you, and thanks for using this!! :-)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

from redtick.

ferfebles avatar ferfebles commented on July 23, 2024

Glad to help :-)

from redtick.

Related Issues (3)

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.