Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] Title bar and status bar widget
@ 2007-11-08 10:44 Marcus Williams
  2007-11-08 12:10 ` vasudeva
  2007-11-12  0:48 ` William Morgan
  0 siblings, 2 replies; 9+ messages in thread
From: Marcus Williams @ 2007-11-08 10:44 UTC (permalink / raw)


This patch adds two new hooks that allow you to set the title bar of a
terminal (default is no title, to support non-terminal users) and the
status bar of sup (default is standard status bar string).

status-bar-widget
-----------------
File: /home/marcus/.sup/hooks/status-bar-widget.rb
Generates the contents of the status bar
Variables:
  total: Total number of messages in inbox
  spam: Total number of messages marked as spam
  new: Total number of messages marked as unread (new)
  mode: Mode string
  status: Mode status
  title: Mode title

terminal-title-widget
---------------------
File: /home/marcus/.sup/hooks/terminal-title-widget.rb
Generates the contents of the title bar
Variables:
  total: Total number of messages in inbox
  spam: Total number of messages marked as spam
  new: Total number of messages marked as unread (new)
  mode: Mode string
  status: Mode status
  title: Mode title

So I have in my terminal-title-widget.rb (giving me a quick way to see
if I have any email when iconised):

"Sup/#{Redwood::VERSION} - #{new} unread of #{total} messages"

In my title bar this looks like

Sup/0.2 - 12 unread of 4520 messages

Note that the numbers come from the index, so if you read a message
and dont save (via '$') the display doesnt know about those changes.
Incoming messages go straight to index so will update it
automatically.

If its any use I could add counts for other forms of messages
(starred/killed etc) but I only use the spam, new and total and I only
use spam to track what the before-add-message hook is doing :)

Marcus


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

end of thread, other threads:[~2007-11-26 20:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-08 10:44 [sup-talk] [PATCH] Title bar and status bar widget Marcus Williams
2007-11-08 12:10 ` vasudeva
2007-11-09  7:40   ` Marcus Williams
2007-11-12  0:48 ` William Morgan
2007-11-12  9:23   ` Marcus Williams
2007-11-12 17:02     ` William Morgan
2007-11-12 22:07       ` Marcus Williams
2007-11-26 20:42         ` William Morgan
2007-11-26 20:45           ` Marcus Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox