mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
* bin/menu: make internationalizable menu prompt
* debian/rules: get-po from menu * bin/*: test if enabled/disabled before executing, LP: #341557 -- Dustin Kirkland <kirkland@ubuntu.com>Thu, 12 Mar 2009 02:08:32 -0500
This commit is contained in:
parent
4da157e8e9
commit
3d3f67eb1f
17 changed files with 55 additions and 19 deletions
|
@ -17,6 +17,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is "on"
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
|
||||
count=`grep -c "^processor.*:" /proc/cpuinfo`
|
||||
[ "$count" = "1" ] || echo $count"x"
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is "on"
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
|
||||
mhz=`grep -m 1 "^cpu MHz" /proc/cpuinfo | awk -F"[:.]" '{print $2}'`
|
||||
if [ $mhz -ge 1000 ]; then
|
||||
|
|
|
@ -20,6 +20,12 @@
|
|||
|
||||
FORCE=0
|
||||
DETAIL=0
|
||||
|
||||
# Default is "off"
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" && FORCE=1
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && FORCE=0
|
||||
|
||||
for arg in $@; do
|
||||
case "$arg" in
|
||||
-f|--force)
|
||||
|
|
|
@ -17,4 +17,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
hostname -s
|
||||
# Default is "off"
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0
|
||||
|
||||
echo "@"`hostname -s`
|
||||
|
|
|
@ -17,5 +17,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is "on"
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
|
||||
cat /proc/loadavg | cut -d " " -f -1
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is on
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
|
||||
mem=`free | grep -m 1 "^Mem:" | awk '{print $2}'`
|
||||
if [ $mem -ge 1048576 ]; then
|
||||
|
|
|
@ -17,5 +17,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is on
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
|
||||
free | awk '/buffers\/cache:/ {printf "%.0f%%\n", 100*$3/($3 + $4)}'
|
||||
free | awk '/buffers\/cache:/ {printf ",%.0f%%\n", 100*$3/($3 + $4)}'
|
||||
|
|
|
@ -17,5 +17,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is on
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
|
||||
[ -e /var/run/reboot-required ] && echo "(@)"
|
||||
|
|
|
@ -17,4 +17,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is on
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
|
||||
echo $(/usr/bin/lsb_release -s -i) $(/usr/bin/lsb_release -s -r)
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is on
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
|
||||
# expire the cache in X seconds; 1 hour by default
|
||||
EXPIRATION=3600
|
||||
|
|
|
@ -17,4 +17,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is "off"
|
||||
p=`basename $0`
|
||||
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0
|
||||
|
||||
whoami
|
||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,8 +1,10 @@
|
|||
screen-profiles (1.37) unreleased; urgency=low
|
||||
|
||||
*
|
||||
* bin/menu: make internationalizable menu prompt
|
||||
* debian/rules: get-po from menu
|
||||
* bin/*: test if enabled/disabled before executing, LP: #341557
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 10 Mar 2009 16:45:09 -0500
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 12 Mar 2009 02:08:32 -0500
|
||||
|
||||
screen-profiles (1.36-0ubuntu1) jaunty; urgency=low
|
||||
|
||||
|
|
12
debian/install
vendored
12
debian/install
vendored
|
@ -1,14 +1,4 @@
|
|||
bin/cpu-count var/lib/screen-profiles
|
||||
bin/cpu-freq var/lib/screen-profiles
|
||||
bin/ec2-cost var/lib/screen-profiles
|
||||
bin/hostname var/lib/screen-profiles
|
||||
bin/load-average var/lib/screen-profiles
|
||||
bin/mem-available var/lib/screen-profiles
|
||||
bin/mem-used var/lib/screen-profiles
|
||||
bin/reboot-required var/lib/screen-profiles
|
||||
bin/release var/lib/screen-profiles
|
||||
bin/updates-available var/lib/screen-profiles
|
||||
bin/whoami var/lib/screen-profiles
|
||||
bin/* var/lib/screen-profiles
|
||||
profiles/common usr/share/screen-profiles/profiles
|
||||
profiles/plain usr/share/screen-profiles/profiles
|
||||
profiles/ubuntu-* usr/share/screen-profiles/profiles
|
||||
|
|
2
debian/rules
vendored
2
debian/rules
vendored
|
@ -16,7 +16,7 @@ get-orig-source:
|
|||
|
||||
get-po:
|
||||
xgettext -o po/screen-profiles.pot -L Python -d screen-profiles screen-profiles
|
||||
xgettext -j -o po/screen-profiles.pot -L Shell -d screen-profiles select-screen-profile
|
||||
xgettext -j -o po/screen-profiles.pot -L Shell -d screen-profiles select-screen-profile bin/menu
|
||||
|
||||
|
||||
prebuild:
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2009-03-07 08:47-0600\n"
|
||||
"POT-Creation-Date: 2009-03-12 02:08-0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -170,3 +170,7 @@ msgstr ""
|
|||
#: select-screen-profile:137
|
||||
msgid "Run \"screen\" to activate"
|
||||
msgstr ""
|
||||
|
||||
#: bin/menu:24
|
||||
msgid "Menu:<F9>"
|
||||
msgstr ""
|
||||
|
|
|
@ -36,6 +36,7 @@ backtick 107 2 2 /var/lib/screen-profiles/mem-used
|
|||
backtick 108 600 600 /var/lib/screen-profiles/ec2-cost
|
||||
backtick 109 3600 3600 /var/lib/screen-profiles/hostname
|
||||
backtick 110 3600 3600 /var/lib/screen-profiles/whoami
|
||||
backtick 111 3600 3600 /var/lib/screen-profiles/menu
|
||||
|
||||
hardstatus alwayslastline
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
source /usr/share/screen-profiles/profiles/common
|
||||
|
||||
# Window tabs, second to last line
|
||||
caption always "%{kW}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kW}%?%+Lw%? %= %{=b kW}Menu:<F9>"
|
||||
caption always "%{kW}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kW}%?%+Lw%? %= %{=b Wk}%110`%109` %{=b kW}%111`"
|
||||
|
||||
# Status string, last line
|
||||
hardstatus string '__LOGO__%{=b Wk} %100` %{= Wk} %= %{=b bW}%102`%{= Wk} %{=b rW}%101`%{= Wk} %{= Wg}%108`%{= Wk} %{= Yk}%106`%{= Wk} %{= Wk}%104`%{=b cW}%103`%{= Wk} %{=b gW}%105`,%107`%{= Wk} %Y-%m-%d %0c:%s'
|
||||
hardstatus string '__LOGO__%{=b Wk} %100` %{= Wk} %= %{=b bW}%102`%{= Wk} %{=b rW}%101`%{= Wk} %{= Wg}%108`%{= Wk} %{= Yk}%106`%{= Wk} %{= Wk}%104`%{=b cW}%103`%{= Wk} %{=b gW}%105`%107`%{= Wk} %Y-%m-%d %0c:%s'
|
||||
|
||||
# NOTE: There is an arbitrary limit of being able to change colors 16 times
|
||||
# in this 'hardstatus string'.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue