mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* bin/fan_speed, byobu-config, byobu.1, profiles/common,
profiles_generator/profile.skel, rpm/byobu.spec, statusrc: added cpu fan speed status Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
57612524ed
commit
ae4660675a
8 changed files with 44 additions and 2 deletions
33
bin/fan_speed
Executable file
33
bin/fan_speed
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# fan_speed: speed of the cpu or case fan
|
||||
# Copyright (C) 2009 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/>.
|
||||
#
|
||||
|
||||
DIR="/sys/class/hwmon"
|
||||
if [ "$1" = "--detail" ]; then
|
||||
for i in `ls $DIR 2>/dev/null`; do
|
||||
echo "$i:"
|
||||
cat "$DIR/$i"/* 2>/dev/null
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for i in `ls "$DIR/"*"/device/fan"* 2>/dev/null`; do
|
||||
printf "\005{=b }%s\005{-}\005{= }rpm\005{-} " `cat $i`
|
||||
break
|
||||
done
|
|
@ -271,6 +271,7 @@ def readstatus():
|
|||
status["date"]=1
|
||||
status["disk"]=0
|
||||
status["ec2_cost"]=0
|
||||
status["fan_speed"]=0
|
||||
status["hostname"]=0
|
||||
status["ip_address"]=0
|
||||
status["load_average"]=1
|
||||
|
|
2
byobu.1
2
byobu.1
|
@ -27,6 +27,8 @@ byobu \- wrapper script for seeding a user's byobu configuration and launching s
|
|||
|
||||
\fBec2_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Amazon EC2 billing model; displayed in the lower bar toward the right in green text on a grey background; there is a leading '~' to indicate that this is an estimation, and the monetary units are US Dollars '$'
|
||||
|
||||
\fBfan_speed\fP \- cpu or system fan speed as reported by lm-sensors; displayed in the lower bar toward the right in black text on a grey background; there is a trailing 'rpm' for units
|
||||
|
||||
\fBhostname\fP \- the hostname of the system; displayed in the upper bar on the far right in bold black text on a grey background; there is a leading '@' symbol if the username status is also enabled
|
||||
|
||||
\fBip_address\fP \- the ip address of the system in dotted decimal form; displayed in the upper bar on the far right in bold black text on a grey background
|
||||
|
|
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -5,8 +5,11 @@ byobu (2.19) unreleased; urgency=low
|
|||
* bin/temp_c, bin/temp_f: fix display of yellow on dark tty's
|
||||
* bin/*: use bold for measurements, and non-bold for units; this really
|
||||
makes byobu's status items 'pop'!
|
||||
* bin/fan_speed, byobu-config, byobu.1, profiles/common,
|
||||
profiles_generator/profile.skel, rpm/byobu.spec, statusrc: added cpu
|
||||
fan speed status
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 03 Jul 2009 15:46:49 -0700
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 03 Jul 2009 16:09:08 -0700
|
||||
|
||||
byobu (2.18-0ubuntu1) karmic; urgency=low
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ backtick 124 86117 86117 true
|
|||
backtick 125 19 19 byobu-status temp_c
|
||||
backtick 126 19 19 byobu-status temp_f
|
||||
backtick 127 5 5 byobu-status mail
|
||||
backtick 128 23 23 byobu-status fan_speed
|
||||
|
||||
hardstatus alwayslastline
|
||||
|
||||
|
|
|
@ -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`%10`"
|
||||
|
||||
# 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`%120`%121`'
|
||||
hardstatus string '%99`%{= Wk} %100`%112`%= %102`%101`%127`%114`%115`%108`%128`%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
|
||||
# to change colors 16 times in this 'hardstatus string'.
|
||||
|
|
|
@ -79,6 +79,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||
/usr/lib/byobu/date
|
||||
/usr/lib/byobu/disk
|
||||
/usr/lib/byobu/ec2_cost
|
||||
/usr/lib/byobu/fan_speed
|
||||
/usr/lib/byobu/hostname
|
||||
/usr/lib/byobu/ip_address
|
||||
/usr/lib/byobu/load_average
|
||||
|
|
1
statusrc
1
statusrc
|
@ -25,6 +25,7 @@ cpu_freq=1
|
|||
date=1
|
||||
disk=0
|
||||
ec2_cost=0
|
||||
fan_speed=0
|
||||
hostname=0
|
||||
ip_address=0
|
||||
load_average=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue