From mboxrd@z Thu Jan 1 00:00:00 1970 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Thu, 08 Nov 2007 10:44:44 +0000 Subject: [sup-talk] [PATCH] Title bar and status bar widget Message-ID: <1194518450-sup-4792@tomsk> 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