mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
remove old references to disk_used, disk_available
Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
a9664a0564
commit
8bac2133e2
8 changed files with 15 additions and 48 deletions
|
@ -24,11 +24,10 @@ if [ "$1" = "--detail" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. "$HOME/.$PKG/status" 2>/dev/null || true
|
|
||||||
[ "$disk_used" = "1" ] && comma="," || whitespace=" "
|
|
||||||
|
|
||||||
# Default to /, but let users override
|
# Default to /, but let users override
|
||||||
[ -r "$HOME/.$PKG/disk" ] && MP=`cat "$HOME/.$PKG/disk"` || MP="/"
|
[ -r "$HOME/.$PKG/disk" ] && MP=`cat "$HOME/.$PKG/disk"` || MP="/"
|
||||||
|
case $MP in
|
||||||
|
/dev/*) MP=`grep "$MP" /proc/mounts | awk '{print $2}'` ;;
|
||||||
|
esac
|
||||||
|
|
||||||
d=`df -h -P "$MP" | tail -n 1 | awk '{print $2}'`
|
df -h -P "$MP" | tail -n 1 | awk '{printf "\005{= MW}%sB,%s\005{-}", $2, $5}'
|
||||||
printf "\005{= MW}%sB%s\005{-}%s" "$d" "$comma" "$whitespace"
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/bin/sh -e
|
|
||||||
#
|
|
||||||
# disk_used: print the current disk usage
|
|
||||||
# Copyright (C) 2008 Canonical Ltd.
|
|
||||||
#
|
|
||||||
# Authors: Dustin Kirkland <kirkland@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/>.
|
|
||||||
|
|
||||||
PKG="byobu"
|
|
||||||
|
|
||||||
if [ "$1" = "--detail" ]; then
|
|
||||||
df -h -P
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
. "$HOME/.$PKG/status" 2>/dev/null || true
|
|
||||||
[ "$date" = "1" ] && trailer=" "
|
|
||||||
|
|
||||||
# Default to /, but let users override
|
|
||||||
[ -r "$HOME/.$PKG/disk" ] && MP=`cat "$HOME/.$PKG/disk"` || MP="/"
|
|
||||||
|
|
||||||
used=`df -h -P "$MP" | tail -n 1 | sed "s/%.*$/%/" | sed "s/^.* //"`
|
|
||||||
printf "\005{= MW}%s\005{-}%s" "$used" "$trailer"
|
|
|
@ -255,8 +255,7 @@ def readstatus():
|
||||||
status["cpu_count"]=1
|
status["cpu_count"]=1
|
||||||
status["cpu_freq"]=1
|
status["cpu_freq"]=1
|
||||||
status["date"]=1
|
status["date"]=1
|
||||||
status["disk_available"]=0
|
status["disk"]=0
|
||||||
status["disk_used"]=0
|
|
||||||
status["ec2_cost"]=0
|
status["ec2_cost"]=0
|
||||||
status["hostname"]=0
|
status["hostname"]=0
|
||||||
status["ip_address"]=0
|
status["ip_address"]=0
|
||||||
|
|
|
@ -74,7 +74,7 @@ case "$P" in
|
||||||
[ "$x" = "0" ] && exit 0
|
[ "$x" = "0" ] && exit 0
|
||||||
;;
|
;;
|
||||||
# default = off, user must override to turn on
|
# default = off, user must override to turn on
|
||||||
arch|battery|disk_available|disk_used|ec2_cost|hostname|ip_address|mail|network|processes|users|temp_c|temp_f|whoami|wifi_quality)
|
arch|battery|disk|ec2_cost|hostname|ip_address|mail|network|processes|users|temp_c|temp_f|whoami|wifi_quality)
|
||||||
[ "$x" = "1" ] || exit 0
|
[ "$x" = "1" ] || exit 0
|
||||||
;;
|
;;
|
||||||
--detail)
|
--detail)
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -37,6 +37,10 @@ byobu (2.12) unreleased; urgency=low
|
||||||
improvement
|
improvement
|
||||||
* bin/network: pull network bytes directly from /proc/net/dev, performance
|
* bin/network: pull network bytes directly from /proc/net/dev, performance
|
||||||
improvement
|
improvement
|
||||||
|
* bin/disk, bin/disk_used, profiles/common, profiles/profile.skel:
|
||||||
|
collapse disk usage down to a single status script for performance,
|
||||||
|
support disk partitions as well as mountpoints in ~/.byobu/disk,
|
||||||
|
LP: #388053
|
||||||
|
|
||||||
* byobu-config: have ESC be a hotkey for 'cancel', LP: #373473
|
* byobu-config: have ESC be a hotkey for 'cancel', LP: #373473
|
||||||
|
|
||||||
|
@ -50,7 +54,7 @@ byobu (2.12) unreleased; urgency=low
|
||||||
profiles/profile.skel, rpm/byobu.spec: add a mail status notification,
|
profiles/profile.skel, rpm/byobu.spec: add a mail status notification,
|
||||||
LP: #387936
|
LP: #387936
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 17 Jun 2009 14:55:33 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 17 Jun 2009 15:20:30 -0500
|
||||||
|
|
||||||
byobu (2.11-0ubuntu1) karmic; urgency=low
|
byobu (2.11-0ubuntu1) karmic; urgency=low
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,8 @@ backtick 119 10 10 byobu-status wifi_quality
|
||||||
backtick 120 86400 86400 byobu-status date
|
backtick 120 86400 86400 byobu-status date
|
||||||
backtick 121 86400 86400 byobu-status time
|
backtick 121 86400 86400 byobu-status time
|
||||||
backtick 122 600 600 byobu-status ip_address
|
backtick 122 600 600 byobu-status ip_address
|
||||||
backtick 123 86400 86400 byobu-status disk_available
|
backtick 123 30 30 byobu-status disk
|
||||||
backtick 124 30 30 byobu-status disk_used
|
backtick 124 86400 86400 byobu-status true
|
||||||
backtick 125 30 30 byobu-status temp_c
|
backtick 125 30 30 byobu-status temp_c
|
||||||
backtick 126 30 30 byobu-status temp_f
|
backtick 126 30 30 byobu-status temp_f
|
||||||
backtick 127 10 10 byobu-status mail
|
backtick 127 10 10 byobu-status mail
|
||||||
|
|
|
@ -26,7 +26,7 @@ source /usr/share/byobu/profiles/common
|
||||||
caption always "%{kW}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kW}%?%+Lw%? %= %{= Wk}%110`%109`%122`%111`"
|
caption always "%{kW}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kW}%?%+Lw%? %= %{= Wk}%110`%109`%122`%111`"
|
||||||
|
|
||||||
# Status string, last line
|
# Status string, last line
|
||||||
hardstatus string '%99`%{= Wk} %100`%112`%= %102`%101`%127`%114`%115`%108`%125`%126`%113`%119`%117`%116`%106`%104`%103`%105`%107`%123`%124`%120`%121`'
|
hardstatus string '%99`%{= Wk} %100`%112`%= %102`%101`%127`%114`%115`%108`%125`%126`%113`%119`%117`%116`%106`%104`%103`%105`%107`%123`%120`%121`'
|
||||||
|
|
||||||
# NOTE: Older version of screen have an arbitrary limit of only being able
|
# NOTE: Older version of screen have an arbitrary limit of only being able
|
||||||
# to change colors 16 times in this 'hardstatus string'.
|
# to change colors 16 times in this 'hardstatus string'.
|
||||||
|
|
|
@ -101,8 +101,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
/usr/lib/byobu/cpu_count
|
/usr/lib/byobu/cpu_count
|
||||||
/usr/lib/byobu/cpu_freq
|
/usr/lib/byobu/cpu_freq
|
||||||
/usr/lib/byobu/date
|
/usr/lib/byobu/date
|
||||||
/usr/lib/byobu/disk_available
|
/usr/lib/byobu/disk
|
||||||
/usr/lib/byobu/disk_used
|
|
||||||
/usr/lib/byobu/ec2_cost
|
/usr/lib/byobu/ec2_cost
|
||||||
/usr/lib/byobu/hostname
|
/usr/lib/byobu/hostname
|
||||||
/usr/lib/byobu/ip_address
|
/usr/lib/byobu/ip_address
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue