From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Show current task in taskbar Date: Wed, 20 Apr 2011 21:34:55 +0100 Message-ID: <8762q8slu8.fsf@ucl.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDOZA-0000iP-NU for emacs-orgmode@gnu.org; Fri, 22 Apr 2011 18:11:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QDOZ9-0005mI-HF for emacs-orgmode@gnu.org; Fri, 22 Apr 2011 18:11:08 -0400 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]:65424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDOZ9-0005la-DI for emacs-orgmode@gnu.org; Fri, 22 Apr 2011 18:11:07 -0400 In-Reply-To: (Nathan Neff's message of "Mon, 18 Apr 2011 10:03:53 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nathan Neff Cc: emacs-orgmode Nathan Neff 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)