* bin/mail, byobu-status, byobu.1, profiles/common,

profiles/profile.skel, rpm/byobu.spec: add a mail status notification,
    LP: #387936


Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-06-17 14:56:13 -05:00
commit a65fcf561a
7 changed files with 37 additions and 3 deletions

26
bin/mail Executable file
View file

@ -0,0 +1,26 @@
#!/bin/sh -e
#
# mail: notify the user if they have system mail
# Copyright (C) 2009 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@canonical.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
mailfile="/var/spool/mail/$USER"
if [ "$1" = "--detail" ]; then
ls -alF "$mailfile" 2>&1
exit 0
fi
[ -s "$mailfile" ] && printf "\005{=b Wb}M\005{-} " || exit 0

View file

@ -74,7 +74,7 @@ case "$P" in
[ "$x" = "0" ] && exit 0 [ "$x" = "0" ] && exit 0
;; ;;
# default = off, user must override to turn on # default = off, user must override to turn on
arch|battery|disk_available|disk_used|ec2_cost|hostname|ip_address|network|processes|users|temp_c|temp_f|whoami|wifi_quality) arch|battery|disk_available|disk_used|ec2_cost|hostname|ip_address|mail|network|processes|users|temp_c|temp_f|whoami|wifi_quality)
[ "$x" = "1" ] || exit 0 [ "$x" = "1" ] || exit 0
;; ;;
--detail) --detail)

View file

@ -21,6 +21,8 @@ byobu \- wrapper script for seeding a user's byobu configuration and launching s
\fBdisk_available\fP \- disk space available on / directory; displayed in the lower bar on the far right in white text on a light purple background; override the default directory by specifying an alternate mount point in \fI$HOME/.byobu/disk\fP \fBdisk_available\fP \- disk space available on / directory; displayed in the lower bar on the far right in white text on a light purple background; override the default directory by specifying an alternate mount point in \fI$HOME/.byobu/disk\fP
\fBmail\fP \- system mail for the current user; the letter 'M' is displayed in the lower bar toward the left in blue text on a white background
\fBmem_used\fP \- disk space used on / directory as a percentage of the total space available on /; displayed in the lower bar on the far right in white text on a light purple background with a trailing '%' sign; override the default directory by specifying an alternate mount point in \fI$HOME/.byobu/disk\fP \fBmem_used\fP \- disk space used on / directory as a percentage of the total space available on /; displayed in the lower bar on the far right in white text on a light purple background with a trailing '%' sign; override the default directory by specifying an alternate mount point in \fI$HOME/.byobu/disk\fP
\fBec2_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Amazon EC2 billing model; displayed in the lower bar toward the right in green text on a grey background; there is a leading '~' to indicate that this is an estimation, and the monetary units are US Dollars '$' \fBec2_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Amazon EC2 billing model; displayed in the lower bar toward the right in green text on a grey background; there is a leading '~' to indicate that this is an estimation, and the monetary units are US Dollars '$'

6
debian/changelog vendored
View file

@ -46,7 +46,11 @@ byobu (2.12) unreleased; urgency=low
also support a new keyset, screen-escape-keys which profiles ctrl-a also support a new keyset, screen-escape-keys which profiles ctrl-a
keybindings for common byobu functions, LP: #380944 keybindings for common byobu functions, LP: #380944
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 17 Jun 2009 14:17:15 -0500 * bin/mail, byobu-status, byobu.1, profiles/common,
profiles/profile.skel, rpm/byobu.spec: add a mail status notification,
LP: #387936
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 17 Jun 2009 14:55:33 -0500
byobu (2.11-0ubuntu1) karmic; urgency=low byobu (2.11-0ubuntu1) karmic; urgency=low

View file

@ -54,6 +54,7 @@ backtick 123 86400 86400 byobu-status disk_available
backtick 124 30 30 byobu-status disk_used backtick 124 30 30 byobu-status disk_used
backtick 125 30 30 byobu-status temp_c backtick 125 30 30 byobu-status temp_c
backtick 126 30 30 byobu-status temp_f backtick 126 30 30 byobu-status temp_f
backtick 127 10 10 byobu-status mail
hardstatus alwayslastline hardstatus alwayslastline

View file

@ -26,7 +26,7 @@ source /usr/share/byobu/profiles/common
caption always "%{kW}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kW}%?%+Lw%? %= %{= Wk}%110`%109`%122`%111`" caption always "%{kW}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kW}%?%+Lw%? %= %{= Wk}%110`%109`%122`%111`"
# Status string, last line # Status string, last line
hardstatus string '%99`%{= Wk} %100`%112`%= %102`%101`%114`%115`%108`%125`%126`%113`%119`%117`%116`%106`%104`%103`%105`%107`%123`%124`%120`%121`' hardstatus string '%99`%{= Wk} %100`%112`%= %102`%101`%127`%114`%115`%108`%125`%126`%113`%119`%117`%116`%106`%104`%103`%105`%107`%123`%124`%120`%121`'
# NOTE: Older version of screen have an arbitrary limit of only being able # NOTE: Older version of screen have an arbitrary limit of only being able
# to change colors 16 times in this 'hardstatus string'. # to change colors 16 times in this 'hardstatus string'.

View file

@ -108,6 +108,7 @@ rm -rf $RPM_BUILD_ROOT
/usr/lib/byobu/ip_address /usr/lib/byobu/ip_address
/usr/lib/byobu/load_average /usr/lib/byobu/load_average
/usr/lib/byobu/logo /usr/lib/byobu/logo
/usr/lib/byobu/mail
/usr/lib/byobu/mem_available /usr/lib/byobu/mem_available
/usr/lib/byobu/mem_used /usr/lib/byobu/mem_used
/usr/lib/byobu/menu /usr/lib/byobu/menu