mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-23 06:36:17 -07:00
* A set of fixes for LP: #700911
* usr/bin/byobu-status, usr/bin/byobu-status-detail: - improve support for byobu-status-detail on systems without vim * usr/lib/byobu/mail: test for mail dir, avoids errors * usr/lib/byobu/reboot_required: test for file existence, avoids errors * usr/lib/byobu/wifi_quality: avoid potential divide by zero error
This commit is contained in:
parent
605b7080cb
commit
f13a04c125
6 changed files with 30 additions and 13 deletions
11
debian/changelog
vendored
11
debian/changelog
vendored
|
@ -1,10 +1,21 @@
|
||||||
byobu (3.26) unreleased; urgency=low
|
byobu (3.26) unreleased; urgency=low
|
||||||
|
|
||||||
|
[ Dustin Kirkland ]
|
||||||
* usr/bin/byobu-reconnect-sockets, usr/lib/byobu/date,
|
* usr/bin/byobu-reconnect-sockets, usr/lib/byobu/date,
|
||||||
usr/share/byobu/keybindings/f-keys,
|
usr/share/byobu/keybindings/f-keys,
|
||||||
usr/share/byobu/keybindings/screen-escape-keys:
|
usr/share/byobu/keybindings/screen-escape-keys:
|
||||||
- add a ctrl-f5 keybinding for reconnecting sockets
|
- add a ctrl-f5 keybinding for reconnecting sockets
|
||||||
|
|
||||||
|
[ swalker <sdwalker@myrealbox.com> ]
|
||||||
|
* A set of fixes for LP: #700911
|
||||||
|
* usr/bin/byobu-status, usr/bin/byobu-status-detail:
|
||||||
|
- improve support for byobu-status-detail on systems without vim
|
||||||
|
* usr/lib/byobu/mail: test for mail dir, avoids errors
|
||||||
|
* usr/lib/byobu/reboot_required: test for file existence, avoids errors
|
||||||
|
|
||||||
|
[ Dustin Kirkland + swalker <sdwalker@myrealbox.com> ]
|
||||||
|
* usr/lib/byobu/wifi_quality: avoid potential divide by zero error
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 23 Jan 2011 16:28:45 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 23 Jan 2011 16:28:45 -0600
|
||||||
|
|
||||||
byobu (3.25-0ubuntu1) natty; urgency=low
|
byobu (3.25-0ubuntu1) natty; urgency=low
|
||||||
|
|
|
@ -69,7 +69,10 @@ case "$P" in
|
||||||
if which dpkg-query >/dev/null; then
|
if which dpkg-query >/dev/null; then
|
||||||
VER=$(set -- $(dpkg-query --show $PKG); echo "$2")
|
VER=$(set -- $(dpkg-query --show $PKG); echo "$2")
|
||||||
fi
|
fi
|
||||||
printf "$PKG-$VER Detailed Status Navigation\n Expand all - zr\t\tCollapse all - zm\n Expand one - zo\t\tCollapse one - zc\n\n"
|
printf "$PKG-$VER Detailed Status Navigation\n"
|
||||||
|
if which vim >/dev/null && `vim --version | grep -q +folding`; then
|
||||||
|
printf " Expand all - zr\t\tCollapse all - zm\n Expand one - zo\t\tCollapse one - zc\n\n"
|
||||||
|
fi
|
||||||
for i in "$BYOBU_PREFIX/lib/$PKG"/* "$DATA/bin"/*; do
|
for i in "$BYOBU_PREFIX/lib/$PKG"/* "$DATA/bin"/*; do
|
||||||
i=${i##*/}
|
i=${i##*/}
|
||||||
[ "$i" = "menu" ] && continue
|
[ "$i" = "menu" ] && continue
|
||||||
|
|
|
@ -17,12 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
case "$(vim --version)" in
|
if which vim >/dev/null && `vim --version | grep -q +folding`; then
|
||||||
*+folding*)
|
|
||||||
exec byobu-status --detail | vim -c "set foldmethod=indent" -c "set foldminlines=0" -c "set foldnestmax=1" -c "set foldcolumn=2" -R -
|
exec byobu-status --detail | vim -c "set foldmethod=indent" -c "set foldminlines=0" -c "set foldnestmax=1" -c "set foldcolumn=2" -R -
|
||||||
;;
|
else
|
||||||
*)
|
(which sensible-pager >/dev/null) && PAGER=sensible-pager || PAGER=less
|
||||||
(which sensible-pager >/dev/null) && exec byobu-status --detail | sensible-pager
|
exec byobu-status --detail | $PAGER
|
||||||
exec byobu-status --detail | less
|
fi
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ color 2>/dev/null || color() { true; }
|
||||||
|
|
||||||
mailfile="/var/spool/mail/$USER"
|
mailfile="/var/spool/mail/$USER"
|
||||||
if [ "$1" = "--detail" ]; then
|
if [ "$1" = "--detail" ]; then
|
||||||
ls -alF "$mailfile" 2>&1
|
[ -s "$mailfile" ] && ls -alF "$mailfile" 2>&1
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,8 @@ reboot="/var/run/reboot-required"
|
||||||
reload="$DIR/$PKG.reload-required"
|
reload="$DIR/$PKG.reload-required"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--detail)
|
--detail)
|
||||||
ls -alF "$reboot" "$reload" 2>&1
|
[ -e "$reboot" ] && ls -alF "$reboot" 2>&1
|
||||||
|
[ -e "$reload" ] && ls -alF "$reload" 2>&1
|
||||||
;;
|
;;
|
||||||
--short)
|
--short)
|
||||||
[ -e "$reboot" ] && printf "Yes" || printf "No"
|
[ -e "$reboot" ] && printf "Yes" || printf "No"
|
||||||
|
|
|
@ -27,6 +27,11 @@ fi
|
||||||
|
|
||||||
iwconfig=`/sbin/iwconfig 2>/dev/null`
|
iwconfig=`/sbin/iwconfig 2>/dev/null`
|
||||||
bitrate=`echo "$iwconfig" | grep "Bit Rate." | sed -e "s/^.*Bit Rate.//" -e "s/ .*$//g"`
|
bitrate=`echo "$iwconfig" | grep "Bit Rate." | sed -e "s/^.*Bit Rate.//" -e "s/ .*$//g"`
|
||||||
[ -z "$bitrate" ] && exit 0
|
[ -z "$bitrate" ] && bitrate="0"
|
||||||
quality=`echo "$iwconfig" | grep "Link Quality." | sed -e "s/^.*Link Quality.//" -e "s/ .*$//g" | awk -F/ '{printf "%.0f", 100*$1/$2}'`
|
quality=`echo "$iwconfig" | grep "Link Quality." | sed -e "s/^.*Link Quality.//" -e "s/ .*$//g"`
|
||||||
|
if [ -z "$quality" ] || [ "$quality" = "0" ]; then
|
||||||
|
quality="0"
|
||||||
|
else
|
||||||
|
quality=`echo "$quality" | awk -F/ '{printf "%.0f", 100*$1/$2}'`
|
||||||
|
fi
|
||||||
printf "$(color b C k)%s$(color -)$(color C k)%s,$(color -)$(color b C k)%s$(color -)$(color C k)%%$(color -) " "$bitrate" "Mbps" "$quality"
|
printf "$(color b C k)%s$(color -)$(color C k)%s,$(color -)$(color b C k)%s$(color -)$(color C k)%%$(color -) " "$bitrate" "Mbps" "$quality"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue