From 5e272be6bcc80bf2fd5e9254562e3f22c0c20140 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Fri, 4 Feb 2011 22:09:29 -0700 Subject: [PATCH] * rename: - wastebasket -> trash - uclock -> time_binary - ugraph -> /usr/bin/byobu-ugraph - ulevel -> /usr/bin/byobu-ulevel * usr/lib/byobu/time_binary: New UTF-8 notification showing time in binary * usr/lib/byobu/byobu-ugraph: New UTF-8 notification utility showing historical byobu-ugraph data (required bash). * usr/bin/byobu-ulevel: New UTF-8 notification utility which displays * usr/lib/byobu/trash: New ASCII+UTF-8 notification indicating contents of trash. --- debian/changelog | 17 +++++++++++------ usr/{lib/byobu/ugraph => bin/byobu-ugraph} | 10 +++++----- usr/{lib/byobu/ulevel => bin/byobu-ulevel} | 2 +- usr/lib/byobu/Makefile.am | 2 +- usr/lib/byobu/{uclock => time_binary} | 0 usr/lib/byobu/{wastebasket => trash} | 20 +++++--------------- 6 files changed, 23 insertions(+), 28 deletions(-) rename usr/{lib/byobu/ugraph => bin/byobu-ugraph} (93%) rename usr/{lib/byobu/ulevel => bin/byobu-ulevel} (99%) rename usr/lib/byobu/{uclock => time_binary} (100%) rename usr/lib/byobu/{wastebasket => trash} (72%) diff --git a/debian/changelog b/debian/changelog index 193e5fd1..e8d7932e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,17 +4,22 @@ byobu (3.28) unreleased; urgency=low * usr/lib/byobu/wifi_quality: don't show wifi-quality if connectivity == 0 * usr/lib/byobu/disk_io: don't show disk_io if rate = 0 * usr/lib/byobu/services: finally fix that nagging, mysterious whitespace + * rename: + - wastebasket -> trash + - uclock -> time_binary + - ugraph -> /usr/bin/byobu-ugraph + - ulevel -> /usr/bin/byobu-ulevel [ James Hunt ] - * usr/lib/byobu/uclock: New UTF-8 notification showing time in binary + * usr/lib/byobu/time_binary: New UTF-8 notification showing time in binary (requires bash) (LP: #705037). - * usr/lib/byobu/ugraph: New UTF-8 notification utility showing historical - ulevel data (required bash). - * usr/lib/byobu/ulevel: New UTF-8 notification utility which displays + * usr/lib/byobu/byobu-ugraph: New UTF-8 notification utility showing + historical byobu-ugraph data (required bash). + * usr/bin/byobu-ulevel: New UTF-8 notification utility which displays some 'level' using various unicode characters (requires bash) (LP: #705032). - * usr/lib/byobu/wastebasket: New ASCII+UTF-8 notification indicating - contents of wastebasket. + * usr/lib/byobu/trash: New ASCII+UTF-8 notification indicating + contents of trash. * usr/lib/byobu/wifi_quality: added UTF-8 icon. -- Dustin Kirkland Fri, 28 Jan 2011 17:12:27 -0600 diff --git a/usr/lib/byobu/ugraph b/usr/bin/byobu-ugraph similarity index 93% rename from usr/lib/byobu/ugraph rename to usr/bin/byobu-ugraph index 9a2d20df..7b36c559 100755 --- a/usr/lib/byobu/ugraph +++ b/usr/bin/byobu-ugraph @@ -1,8 +1,8 @@ #!/bin/bash #--------------------------------------------------------------------- -# Script to display a byobo notification "history graph". +# Script to display a byobu notification "history graph". # -# Designed to work with the wonderful byoby(1) but can be run +# Designed to work with the wonderful byobu(1) but can be run # stand-alone. #--------------------------------------------------------------------- # @@ -48,7 +48,7 @@ usage() { cat < (default is to rotate). Option implies file should not be written to so a command cannot follow script options in this case. - -t : 'ulevel' theme to use (default=$theme_default). + -t : 'byobu-ulevel' theme to use (default=$theme_default). -x : Maximum value (default=$max_default). @@ -208,5 +208,5 @@ data=$(get_data) for datum in $data do - ulevel.sh -n -m $min -x $max -c $datum -t $theme + byobu-ulevel -n -m $min -x $max -c $datum -t $theme done diff --git a/usr/lib/byobu/ulevel b/usr/bin/byobu-ulevel similarity index 99% rename from usr/lib/byobu/ulevel rename to usr/bin/byobu-ulevel index c6d5334c..25075e1d 100755 --- a/usr/lib/byobu/ulevel +++ b/usr/bin/byobu-ulevel @@ -3,7 +3,7 @@ # Script to display unicode characters representing the level of # some indicator. # -# Designed to work with the wonderful byoby(1) but can be run +# Designed to work with the wonderful byobu(1) but can be run # stand-alone. #--------------------------------------------------------------------- # diff --git a/usr/lib/byobu/Makefile.am b/usr/lib/byobu/Makefile.am index 866b31e2..7772bc0d 100644 --- a/usr/lib/byobu/Makefile.am +++ b/usr/lib/byobu/Makefile.am @@ -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 .notify_osd notify_osd processes raid rcs_cost reboot_required release services swap time time_utc uclock ugraph ulevel updates_available uptime users wastebasket 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 notify_osd processes raid rcs_cost reboot_required release services swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality diff --git a/usr/lib/byobu/uclock b/usr/lib/byobu/time_binary similarity index 100% rename from usr/lib/byobu/uclock rename to usr/lib/byobu/time_binary diff --git a/usr/lib/byobu/wastebasket b/usr/lib/byobu/trash similarity index 72% rename from usr/lib/byobu/wastebasket rename to usr/lib/byobu/trash index fba72e71..ff476afb 100755 --- a/usr/lib/byobu/wastebasket +++ b/usr/lib/byobu/trash @@ -1,6 +1,6 @@ #!/bin/sh -e # -# wastebasket: show icon (and optionally count) if entries in wastebasket. +# trash: show icon (and optionally count) if entries in trash. # Copyright (C) 2011 Canonical Ltd. # # Authors: James Hunt @@ -18,22 +18,12 @@ # along with this program. If not, see . # -PKG="byobu" -color 2>/dev/null || color() { true; } - -[ "$UTF8" = "1" ] && ICON="♸" || ICON="W" - -dir=$HOME/.local/share/Trash/files +[ "$UTF8" = "1" ] && ICON="♸" || ICON="T" +dir="$HOME/.local/share/Trash/files" [ ! -d $dir ] && exit 0 + count=$(ls $dir|wc -l) [ "$count" -eq 0 ] && exit 0 -if [ "$1" = "--detail" ] -then - echo -n "${ICON}[$count]" -else - echo -n $ICON -fi - -exit 0 +echo -n "$ICON[$count] "