emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Clocking time in frame title bar
@ 2012-02-23 18:45 Borbus
  2012-02-23 19:42 ` Borbus
  0 siblings, 1 reply; 2+ messages in thread
From: Borbus @ 2012-02-23 18:45 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I'm really enjoying using org-mode's clocking features and it's nice
that it shows the current task and total clocking time in the modeline
but for me there is a problem with this: I often have multiple windows
open and my frame is split horizontally.  This means the modeline is too
short to contain this information.  Also even if I could see it, it's
being displayed redundantly in multiple modelines.

So I thought about how it could be different and I realised something: I
use the emacs GTK GUI but I turn off most things, scrollbars, menubars
etc. but there is one thing still wasting space: the frame title bar.
So why not use this space?

I know emacs lisp and I'm happy to write a patch for this myself, but
before I dive in I would like to ask a couple of questions here: first,
does this sounds feasible?  Is there something I don't know about the
frame title that would make it unsuitable for being constantly updated
like the modeline?  Secondly, if it seems feasible, where is the best
place to start in the org code (org-clock.el I guess) and would there be
a preferable way to be able to switch this feature on and off?

Thanks,

Borbus.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Clocking time in frame title bar
  2012-02-23 18:45 Clocking time in frame title bar Borbus
@ 2012-02-23 19:42 ` Borbus
  0 siblings, 0 replies; 2+ messages in thread
From: Borbus @ 2012-02-23 19:42 UTC (permalink / raw)
  To: emacs-orgmode

Well I just went ahead and wrote the hack anyway and it seems to work
for me, here is what I did:

;; show clock and timer stuff in the frame title
(defvar plain-frame-title-format frame-title-format)
(defun clock-in-frame-title ()
  (if (org-clocking-p)
      (setq frame-title-format (list (concat
                                      (car plain-frame-title-format)
                                      " :: Clocked in: "
                                      (org-clock-get-clock-string)
                                      " :: Pomodoro:"
                                      org-timer-mode-line-string)))
    (setq frame-title-format plain-frame-title-format)))
(run-at-time t 1 'clock-in-frame-title)
(add-hook 'org-clock-in-hook 'clock-in-frame-title)
(add-hook 'org-clock-out-hook 'clock-in-frame-title)
(add-hook 'org-clock-cancel-hook 'clock-in-frame-title)

Any comments? Is run-at-time the best thing to use here?  Note that I
use the Pomodoro method and use the code to start the Pomodoro that was
posted to this list previously: http://orgmode.org/worg/org-gtd-etc.html

Borbus.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-23 19:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 18:45 Clocking time in frame title bar Borbus
2012-02-23 19:42 ` Borbus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).