Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to log the number of timers completed #1

Closed
se4u opened this issue Nov 3, 2016 · 3 comments
Closed

How to log the number of timers completed #1

se4u opened this issue Nov 3, 2016 · 3 comments

Comments

@se4u
Copy link

se4u commented Nov 3, 2016

First of all thanks for the great app.

I was wondering if you could say what will be the easiest way to update redtick, so that it shows the number of pomodairo cycles completed alongside the timer character ? Or does it have this functionality already?

@ferfebles
Copy link
Owner

ferfebles commented Nov 3, 2016

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!! :-)

@se4u
Copy link
Author

se4u commented Nov 4, 2016

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.

@se4u se4u closed this as completed Nov 4, 2016
@ferfebles
Copy link
Owner

Glad to help :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants