* etc/byobu/statusrc, usr/bin/byobu-config, usr/lib/byobu/Makefile.am,

usr/lib/byobu/notify_osd, usr/share/byobu/profiles/common,
  usr/share/man/man1/byobu.1:
  - add notify_osd support to byobu, LP: #669189
This commit is contained in:
Dustin Kirkland 2010-10-31 14:31:32 -04:00
commit 02ae6fc4d5
7 changed files with 45 additions and 1 deletions

4
debian/changelog vendored
View file

@ -3,6 +3,10 @@ byobu (3.7) unreleased; urgency=low
* usr/lib/byobu/ec2_cost, usr/share/byobu/ec2/rates.eu_ie,
usr/share/byobu/ec2/rates.us_ca, usr/share/byobu/ec2/rates.us_va:
- add ec2_cost support for t1.micro instances
* etc/byobu/statusrc, usr/bin/byobu-config, usr/lib/byobu/Makefile.am,
usr/lib/byobu/notify_osd, usr/share/byobu/profiles/common,
usr/share/man/man1/byobu.1:
- add notify_osd support to byobu, LP: #669189
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 21 Oct 2010 12:09:14 -0500

View file

@ -41,6 +41,7 @@ mem_available=1
mem_used=1
menu=1
network=0
notify_osd=1
processes=0
rcs_cost=0
reboot_required=1

View file

@ -305,6 +305,7 @@ def readstatus():
status["mem_used"]=1
status["menu"]=1
status["network"]=0
status["notify_osd"]=1
status["processes"]=0
status["rcs_cost"]=0
status["reboot_required"]=1

View file

@ -1,3 +1,3 @@
libdirdir = $(prefix)/lib/@PACKAGE@
libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp custom date disk disk_io ec2_cost fan_speed hostname ip_address load_average logo mail mem_available mem_used menu network processes rcs_cost reboot_required release services time time_utc updates_available uptime users whoami wifi_quality
libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp custom date disk disk_io ec2_cost fan_speed hostname ip_address load_average logo mail mem_available mem_used menu network notify_osd processes rcs_cost reboot_required release services time time_utc updates_available uptime users whoami wifi_quality

35
usr/lib/byobu/notify_osd Normal file
View file

@ -0,0 +1,35 @@
#!/bin/sh -e
#
# notify_osd: print notify-osd messages in screen's notification buffer
# Copyright (C) 2010 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@canonical.com>
# with help from Mathias Gug <mathias.gug@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/>.
LOG="$HOME"/.cache/notify-osd.log
if [ "$1" = "--detail" ]; then
cat "$LOG"
exit 0
fi
# This line operates basically as a daemon, watching the notify-osd log file,
# processing new messages and sending them to screen
tail -n 0 -F "$LOG" | perl -e '
$/ = "\n\n";
while (<STDIN>) {
$_ =~ s/^.*\]//;
system("/usr/bin/screen -X at 0 echo \"$_\"");
}'

View file

@ -36,6 +36,7 @@ defutf8 on
backtick 10 9999999 9999999 byobu-janitor
backtick 11 9999999 9999999 printf "\005-1="
backtick 12 9999999 9999999 byobu-status color
backtick 13 0 0 byobu-status notify_osd
backtick 99 9999999 9999999 byobu-status logo
backtick 100 599 599 byobu-status release
backtick 101 7 7 byobu-status updates_available

View file

@ -58,6 +58,8 @@ byobu \- wrapper script for seeding a user's byobu configuration and launching s
\fBnetwork\fP \- instantaneous upload/download bandwidth in [GMk]bps over the last 3 seconds; displayed in the lower bar toward the right in white text on a purple background with a leading '^' sign indicating 'up' and 'v' sign indicating 'down'; override the default interface by specifying an alternate interface with MONITORED_NETWORK=eth1, and override the default units (bits) with NETWORK_UNITS=bytes in \fI$HOME/.byobu/statusrc\fP
\fBnotify_osd\fP \- Send on-screen notification messages to screen's notification buffer
\fBprocesses\fP \- total number of processes running on the system; displayed in the lower bar in white text on a dark yellow background with a trailing '&' indicating 'background processes'
\fBreboot_required\fP \- symbol present if a reboot is required following a system update; displayed in the lower bar white text on a blue background by the symbol '(R)'; additionally, reboot_required will print '<F5>' in white text on a blue background, if Byobu requires you to reload your profile to affect some changes.