emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Show current task in taskbar


From: Eric S Fraga
Subject: Re: [O] Show current task in taskbar
Date: Wed, 20 Apr 2011 21:34:55 +0100
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

Nathan Neff <address@hidden> writes:

> Hello,
>
> I use wmii which is a minimalist tiling window manager.
> It has a taskbar that can show text/icons, etc.
>
> I'd like to see my currently logged in task on the taskbar.
>
> The way I see it, I could either 1) poll emacs for the current task
> or 2) have emacs run a cron job and output the current task to a file
> or directly
> set the taskbar
>
> Has anyone done something like this?  I found the "External Programs" section
> on this page:  http://orgmode.org/worg/org-hacks.html but didn't find
> anything directly.
>
> Thanks,
> --Nate

With ratpoison, I use either conky or dzen2 to write out a status line
that is outside the window manager's control.  one of the things I used
to do is echo the contents of a file to that status bar and that file
would include the clocking information.  this clocking information was
generated by the following elisp code:

--8<---------------cut here---------------start------------->8---
(defun esf/org-clocking-info-to-file ()
  (with-temp-file "~/tmp/clocking"
    ;; (message (org-clock-get-clock-string))
    (if (org-clock-is-active)
        (insert (format "org: %d/%d min" 
                        (- (org-clock-get-clocked-time) org-clock-total-time)
                        (org-clock-get-clocked-time))
                )
      ) ;;(org-clock-get-clock-string)
    )
  )
(add-hook 'display-time-hook 'esf/org-clocking-info-to-file)
--8<---------------cut here---------------end--------------->8---

I haven't used this in a while so cannot guarantee it will work with org
7.5, say, but it should.  It requires you to have invoked (display-time)
to hook into that display and obviously something to echo the contents
of the file (~/tmp/clocking in above) into your wmii status bar.

HTH,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.183.g1997)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]