Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: marcus-sup@bar-coded.net (Marcus Williams)
Subject: [sup-talk] [PATCH] Title bar and status bar widget
Date: Thu, 08 Nov 2007 10:44:44 +0000	[thread overview]
Message-ID: <1194518450-sup-4792@tomsk> (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


             reply	other threads:[~2007-11-08 10:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-08 10:44 Marcus Williams [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1194518450-sup-4792@tomsk \
    --to=marcus-sup@bar-coded.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox