mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
* bin/disk, bin/logo, bin/network, bin/release, bin/temp_c, bin/temp_f,
byobu-janitor: move config files to sourced config file, use janitor item to clean up Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
e9475ed0e2
commit
78cbcca5f4
8 changed files with 36 additions and 17 deletions
2
bin/disk
2
bin/disk
|
@ -25,7 +25,7 @@ if [ "$1" = "--detail" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Default to /, but let users override
|
# Default to /, but let users override
|
||||||
[ -r "$HOME/.$PKG/disk" ] && MP=`cat "$HOME/.$PKG/disk"` || MP="/"
|
[ -n "$MONITORED_DISK" ] || MP="/"
|
||||||
case $MP in
|
case $MP in
|
||||||
/dev/*) MP=`grep "$MP" /proc/mounts | awk '{print $2}'` ;;
|
/dev/*) MP=`grep "$MP" /proc/mounts | awk '{print $2}'` ;;
|
||||||
esac
|
esac
|
||||||
|
|
13
bin/logo
13
bin/logo
|
@ -87,15 +87,14 @@ print_logo() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -r "$HOME/.$PKG/logo" ]; then
|
if [ -n "$LOGO" ]; then
|
||||||
# Allow users to define their own logo
|
# Allow users to define their own logo in $HOME/.$PKG/status
|
||||||
cat "$HOME/.$PKG/logo" && exit 0 || true
|
printf "%s" "$LOGO" && exit 0 || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -r "$HOME/.$PKG/distro" ]; then
|
if [ -n "$DISTRO" ]; then
|
||||||
# Allow manual override of distro
|
# Allow manual override of distro in $HOME/.$PKG/status
|
||||||
distro=`cat "$HOME/.$PKG/distro"`
|
print_logo "$DISTRO" && exit 0 || true
|
||||||
print_logo "$distro" && exit 0 || true
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -r "/etc/issue" ]; then
|
if [ -r "/etc/issue" ]; then
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
|
|
||||||
# Allow interface overrides in configuration directory
|
# Allow interface overrides in $HOME/.$PKG/status
|
||||||
if [ -r "$HOME/.$PKG/network" ]; then
|
if [ -n "$MONITORED_NETWORK" ]; then
|
||||||
interface=`cat "$HOME/.$PKG/network"`
|
interface="$MONITORED_NETWORK"
|
||||||
else
|
else
|
||||||
interface=`tail -n1 /proc/net/route | awk '{print $1}'`
|
interface=`tail -n1 /proc/net/route | awk '{print $1}'`
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
|
|
||||||
if [ -r "$HOME/.$PKG/distro" ]; then
|
if [ -n "$DISTRO" ]; then
|
||||||
printf "\005{+b }%s\005{-} " `cat "$HOME/.$PKG/distro"`
|
printf "\005{+b }%s\005{-} " "$DISTRO"
|
||||||
elif which lsb_release >/dev/null 2>&1; then
|
elif which lsb_release >/dev/null 2>&1; then
|
||||||
if [ "$1" = "--detail" ]; then
|
if [ "$1" = "--detail" ]; then
|
||||||
lsb_release -a 2>/dev/null
|
lsb_release -a 2>/dev/null
|
||||||
|
|
|
@ -27,7 +27,7 @@ if [ "$1" = "--detail" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in `ls "$DIR/"*"/temperature"`; do
|
for i in `ls $DIR/*/temperature`; do
|
||||||
t=$(sed "s/^[^0-9]\+//" "$i" | sed "s/\s.*$//")
|
t=$(sed "s/^[^0-9]\+//" "$i" | sed "s/\s.*$//")
|
||||||
printf "\005{=b kY}%s\005{-}\005{= kY}\260C\005{-} " "$t"
|
printf "\005{=b kY}%s\005{-}\005{= kY}\260C\005{-} " "$t"
|
||||||
break
|
break
|
||||||
|
|
|
@ -23,7 +23,7 @@ if [ "$1" = "--detail" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in `ls "$DIR/"*"/temperature"`; do
|
for i in `ls $DIR/*/temperature`; do
|
||||||
t=$(sed "s/^[^0-9]\+//" "$i" | sed "s/\s.*$//" | awk '{printf "%.0f", $1 *9/5 + 32}')
|
t=$(sed "s/^[^0-9]\+//" "$i" | sed "s/\s.*$//" | awk '{printf "%.0f", $1 *9/5 + 32}')
|
||||||
printf "\005{=b kY}%s\005{-}\005{= kY}\260F\005{-} " "$t"
|
printf "\005{=b kY}%s\005{-}\005{= kY}\260F\005{-} " "$t"
|
||||||
break
|
break
|
||||||
|
|
|
@ -80,5 +80,22 @@ if grep -qs "screen-launcher$" "$HOME/.profile"; then
|
||||||
/usr/share/$PKG/byobu-launcher-install
|
/usr/share/$PKG/byobu-launcher-install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Affects: Upgrades from <= byobu-2.25
|
||||||
|
# Collapse separate status config files into the sourced config
|
||||||
|
for i in disk network distro logo; do
|
||||||
|
if [ -r "$HOME/.$PKG/$i" ]; then
|
||||||
|
val=`cat $HOME/.$PKG/$i`
|
||||||
|
uc=`echo "$i" | tr "[:lower:]" "[:upper:]"`
|
||||||
|
case $i in
|
||||||
|
disk|network)
|
||||||
|
key="MONITORED_"$uc ;;
|
||||||
|
distro|logo)
|
||||||
|
key="$uc" ;;
|
||||||
|
esac
|
||||||
|
echo "$key=\"$val\"" >> "$HOME/.$PKG/status"
|
||||||
|
rm "$HOME/.$PKG/$i"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Clean up flag
|
# Clean up flag
|
||||||
rm -f "$FLAG"
|
rm -f "$FLAG"
|
||||||
|
|
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -1,8 +1,11 @@
|
||||||
byobu (2.26) unreleased; urgency=low
|
byobu (2.26) unreleased; urgency=low
|
||||||
|
|
||||||
* UNRELEASED
|
* bin/temp_c, bin/temp_f: fix temperature listing
|
||||||
|
* bin/disk, bin/logo, bin/network, bin/release, bin/temp_c, bin/temp_f,
|
||||||
|
byobu-janitor: move config files to sourced config file, use
|
||||||
|
janitor item to clean up
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 05 Aug 2009 16:31:00 +0100
|
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 17 Aug 2009 13:19:50 -0500
|
||||||
|
|
||||||
byobu (2.25-0ubuntu1) karmic; urgency=low
|
byobu (2.25-0ubuntu1) karmic; urgency=low
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue