mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
* usr/bin/byobu-status, usr/lib/byobu/include/constants:
- use printf instead of echo, saves a few forks
This commit is contained in:
parent
be08a714ba
commit
80236e5a40
3 changed files with 6 additions and 4 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -18,6 +18,8 @@ byobu (5.8) unreleased; urgency=low
|
||||||
- do a better job counting ssh users
|
- do a better job counting ssh users
|
||||||
* usr/share/byobu/status/status:
|
* usr/share/byobu/status/status:
|
||||||
- move wifi_quality to second right status
|
- move wifi_quality to second right status
|
||||||
|
* usr/bin/byobu-status, usr/lib/byobu/include/constants:
|
||||||
|
- use printf instead of echo, saves a few forks
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 30 Jan 2012 18:12:49 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 30 Jan 2012 18:12:49 -0600
|
||||||
|
|
||||||
|
|
|
@ -69,10 +69,10 @@ get_status() {
|
||||||
# Update cache now, if necessary
|
# Update cache now, if necessary
|
||||||
if [ $NOW -ge $expiry ] || [ "$lastrun" = "0" ]; then
|
if [ $NOW -ge $expiry ] || [ "$lastrun" = "0" ]; then
|
||||||
"__$function" > "$cachepath"
|
"__$function" > "$cachepath"
|
||||||
echo "$NOW" > "$lastpath"
|
printf "%s" "$NOW" > "$lastpath"
|
||||||
fi
|
fi
|
||||||
if [ -s "$cachepath" ]; then
|
if [ -s "$cachepath" ]; then
|
||||||
IFS= read line < "$cachepath"; printf "$line"
|
IFS= read line < "$cachepath"; printf "%s" "$line"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ case "$1" in
|
||||||
--detail)
|
--detail)
|
||||||
VER=
|
VER=
|
||||||
if command -v dpkg-query >/dev/null; then
|
if command -v dpkg-query >/dev/null; then
|
||||||
VER=$(set -- $(dpkg-query --show $PKG); echo "$2")
|
VER=$(set -- $(dpkg-query --show $PKG); printf "%s\n" "$2")
|
||||||
fi
|
fi
|
||||||
printf "$PKG-$VER Detailed Status Navigation\n"
|
printf "$PKG-$VER Detailed Status Navigation\n"
|
||||||
if command -v vim >/dev/null && `vim --version | grep -q +folding`; then
|
if command -v vim >/dev/null && `vim --version | grep -q +folding`; then
|
||||||
|
|
|
@ -73,7 +73,7 @@ else
|
||||||
ICON_GHz="GHz"
|
ICON_GHz="GHz"
|
||||||
ICON_MBPS="Mbps"
|
ICON_MBPS="Mbps"
|
||||||
fi
|
fi
|
||||||
PCT="%%"
|
PCT="%"
|
||||||
|
|
||||||
# Support two different backends (screen/tmux)
|
# Support two different backends (screen/tmux)
|
||||||
if [ -z "$BYOBU_BACKEND" ]; then
|
if [ -z "$BYOBU_BACKEND" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue