mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
bin/processes: displace a count of the running processes
-Dustin Kirkland <kirkland@ubuntu.com>Fri, 03 Apr 2009 12:23:14 -0500
This commit is contained in:
parent
a2d5a7f77f
commit
7899b1f5a9
11 changed files with 92 additions and 63 deletions
|
@ -95,4 +95,4 @@ if [ "$DETAIL" = "1" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
printf "\005{= Wg}%s\005{-} " $total_cost
|
||||
printf "\005{= wg}%s\005{-} " $total_cost
|
||||
|
|
24
bin/processes
Executable file
24
bin/processes
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# processes - report number of running processes
|
||||
# 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/>.
|
||||
|
||||
# Default is "off"
|
||||
p="processes"
|
||||
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0
|
||||
|
||||
printf "\005{=b }%s&\005{-} " $(ps -e | wc -l)
|
10
bin/uptime
10
bin/uptime
|
@ -25,12 +25,14 @@ p="uptime"
|
|||
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0
|
||||
|
||||
u=$(sed "s/\..*$//" /proc/uptime)
|
||||
printf "\005{=b }"
|
||||
if [ "$u" -gt 86400 ]; then
|
||||
printf "%dd " `echo "$u" | awk '{printf "%.0f", $1 / 86400 }'`
|
||||
printf "%dd" `echo "$u" | awk '{printf "%.0f", $1 / 86400 }'`
|
||||
elif [ "$u" -gt 3600 ]; then
|
||||
printf "%dh " `echo "$u" | awk '{printf "%.0f", $1 / 3600 }'`
|
||||
printf "%dh" `echo "$u" | awk '{printf "%.0f", $1 / 3600 }'`
|
||||
elif [ "$u" -gt 60 ]; then
|
||||
printf "%dm " `echo "$u" | awk '{printf "%.0f", $1 / 60 }'`
|
||||
printf "%dm" `echo "$u" | awk '{printf "%.0f", $1 / 60 }'`
|
||||
else
|
||||
printf "%ds " "$u"
|
||||
printf "%ds" "$u"
|
||||
fi
|
||||
printf "\005{-} "
|
||||
|
|
|
@ -24,4 +24,4 @@
|
|||
p="users"
|
||||
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0
|
||||
|
||||
printf "#%d " `who | wc -l`
|
||||
printf "\005{=b }%d#\005{-} " `who | wc -l`
|
||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -2,6 +2,7 @@ screen-profiles (1.43) unreleased; urgency=low
|
|||
|
||||
[ Dustin Kirkland ]
|
||||
* bin/logo: allow users to define their own logo
|
||||
* bin/processes: displace a count of the running processes
|
||||
* bin/*, profiles/profile.skel: make all status scripts handle their
|
||||
own colors and trailing whitespace; this should help alleviate the
|
||||
16-color-change limitation on un-patched screens; it also simplifies
|
||||
|
@ -12,7 +13,7 @@ screen-profiles (1.43) unreleased; urgency=low
|
|||
added new status items for battery state, number of users, and system
|
||||
uptime
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 03 Apr 2009 12:06:45 -0500
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 03 Apr 2009 12:23:14 -0500
|
||||
|
||||
screen-profiles (1.42-0ubuntu1) jaunty; urgency=low
|
||||
|
||||
|
|
36
po/es.po
36
po/es.po
|
@ -3,13 +3,13 @@
|
|||
# This file is distributed under the same license as the GNU Screen Profiles package.
|
||||
# Nicolas Valcarcel <nvalcarcel@ubuntu.com>, 2008.
|
||||
#
|
||||
#: screen-profiles:300
|
||||
#: screen-profiles:301
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2009-04-03 12:03-0500\n"
|
||||
"POT-Creation-Date: 2009-04-03 12:25-0500\n"
|
||||
"PO-Revision-Date: 2008-12-22 01:01-0500\n"
|
||||
"Last-Translator: Nicolas Valcarcel <nvalcarcel@ubuntu.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -57,7 +57,7 @@ msgstr ""
|
|||
msgid "Exit"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:87 screen-profiles:466
|
||||
#: screen-profiles:87 screen-profiles:467
|
||||
msgid " Screen Profiles Configuration Menu"
|
||||
msgstr ""
|
||||
|
||||
|
@ -66,14 +66,14 @@ msgid "Okay"
|
|||
msgstr ""
|
||||
|
||||
#: screen-profiles:98 screen-profiles:134 screen-profiles:150
|
||||
#: screen-profiles:185 screen-profiles:307 screen-profiles:349
|
||||
#: screen-profiles:427
|
||||
#: screen-profiles:185 screen-profiles:308 screen-profiles:350
|
||||
#: screen-profiles:428
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:116 screen-profiles:143 screen-profiles:157
|
||||
#: screen-profiles:320 screen-profiles:374 screen-profiles:382
|
||||
#: screen-profiles:455
|
||||
#: screen-profiles:321 screen-profiles:375 screen-profiles:383
|
||||
#: screen-profiles:456
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
|
@ -82,7 +82,7 @@ msgid "Screen Profiles Help"
|
|||
msgstr ""
|
||||
|
||||
#: screen-profiles:134 screen-profiles:150 screen-profiles:185
|
||||
#: screen-profiles:307 screen-profiles:349 screen-profiles:427
|
||||
#: screen-profiles:308 screen-profiles:350 screen-profiles:428
|
||||
msgid "Apply"
|
||||
msgstr ""
|
||||
|
||||
|
@ -90,8 +90,8 @@ msgstr ""
|
|||
msgid "Which profile would you like to use?"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:142 screen-profiles:156 screen-profiles:319
|
||||
#: screen-profiles:381 screen-profiles:453
|
||||
#: screen-profiles:142 screen-profiles:156 screen-profiles:320
|
||||
#: screen-profiles:382 screen-profiles:454
|
||||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
|
@ -119,35 +119,35 @@ msgstr ""
|
|||
msgid "Create new window(s):"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:308
|
||||
#: screen-profiles:309
|
||||
msgid "Toggle status notifications:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:341
|
||||
#: screen-profiles:342
|
||||
msgid "Windows:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:351
|
||||
#: screen-profiles:352
|
||||
msgid "Select window(s) to create by default:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:371
|
||||
#: screen-profiles:372
|
||||
msgid "Screen will be launched automatically next time you login."
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:379
|
||||
#: screen-profiles:380
|
||||
msgid "Screen will not be used next time you login."
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:426
|
||||
#: screen-profiles:427
|
||||
msgid "Escape key: ctrl-"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:429
|
||||
#: screen-profiles:430
|
||||
msgid "Change escape sequence:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:467
|
||||
#: screen-profiles:468
|
||||
msgid "<Tab>/<Alt-Tab> between elements | <Return> Validates"
|
||||
msgstr ""
|
||||
|
||||
|
|
36
po/fr.po
36
po/fr.po
|
@ -3,13 +3,13 @@
|
|||
# This file is distributed under the same license as the GNU Screen Profiles package.
|
||||
# Nicolas Barcet <nicolas.barcet@ubuntu.com>, 2008.
|
||||
#
|
||||
#: screen-profiles:300
|
||||
#: screen-profiles:301
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2009-04-03 12:03-0500\n"
|
||||
"POT-Creation-Date: 2009-04-03 12:25-0500\n"
|
||||
"PO-Revision-Date: 2008-12-17 23:42+0100\n"
|
||||
"Last-Translator: Nicolas Barcet <nicolas.barcet@ubuntu.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -57,7 +57,7 @@ msgstr ""
|
|||
msgid "Exit"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:87 screen-profiles:466
|
||||
#: screen-profiles:87 screen-profiles:467
|
||||
msgid " Screen Profiles Configuration Menu"
|
||||
msgstr ""
|
||||
|
||||
|
@ -66,14 +66,14 @@ msgid "Okay"
|
|||
msgstr ""
|
||||
|
||||
#: screen-profiles:98 screen-profiles:134 screen-profiles:150
|
||||
#: screen-profiles:185 screen-profiles:307 screen-profiles:349
|
||||
#: screen-profiles:427
|
||||
#: screen-profiles:185 screen-profiles:308 screen-profiles:350
|
||||
#: screen-profiles:428
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:116 screen-profiles:143 screen-profiles:157
|
||||
#: screen-profiles:320 screen-profiles:374 screen-profiles:382
|
||||
#: screen-profiles:455
|
||||
#: screen-profiles:321 screen-profiles:375 screen-profiles:383
|
||||
#: screen-profiles:456
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
|
@ -82,7 +82,7 @@ msgid "Screen Profiles Help"
|
|||
msgstr ""
|
||||
|
||||
#: screen-profiles:134 screen-profiles:150 screen-profiles:185
|
||||
#: screen-profiles:307 screen-profiles:349 screen-profiles:427
|
||||
#: screen-profiles:308 screen-profiles:350 screen-profiles:428
|
||||
msgid "Apply"
|
||||
msgstr ""
|
||||
|
||||
|
@ -90,8 +90,8 @@ msgstr ""
|
|||
msgid "Which profile would you like to use?"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:142 screen-profiles:156 screen-profiles:319
|
||||
#: screen-profiles:381 screen-profiles:453
|
||||
#: screen-profiles:142 screen-profiles:156 screen-profiles:320
|
||||
#: screen-profiles:382 screen-profiles:454
|
||||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
|
@ -119,35 +119,35 @@ msgstr ""
|
|||
msgid "Create new window(s):"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:308
|
||||
#: screen-profiles:309
|
||||
msgid "Toggle status notifications:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:341
|
||||
#: screen-profiles:342
|
||||
msgid "Windows:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:351
|
||||
#: screen-profiles:352
|
||||
msgid "Select window(s) to create by default:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:371
|
||||
#: screen-profiles:372
|
||||
msgid "Screen will be launched automatically next time you login."
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:379
|
||||
#: screen-profiles:380
|
||||
msgid "Screen will not be used next time you login."
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:426
|
||||
#: screen-profiles:427
|
||||
msgid "Escape key: ctrl-"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:429
|
||||
#: screen-profiles:430
|
||||
msgid "Change escape sequence:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:467
|
||||
#: screen-profiles:468
|
||||
msgid "<Tab>/<Alt-Tab> between elements | <Return> Validates"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#: screen-profiles:300
|
||||
#: screen-profiles:301
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2009-04-03 12:03-0500\n"
|
||||
"POT-Creation-Date: 2009-04-03 12:25-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"
|
||||
|
@ -57,7 +57,7 @@ msgstr ""
|
|||
msgid "Exit"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:87 screen-profiles:466
|
||||
#: screen-profiles:87 screen-profiles:467
|
||||
msgid " Screen Profiles Configuration Menu"
|
||||
msgstr ""
|
||||
|
||||
|
@ -66,14 +66,14 @@ msgid "Okay"
|
|||
msgstr ""
|
||||
|
||||
#: screen-profiles:98 screen-profiles:134 screen-profiles:150
|
||||
#: screen-profiles:185 screen-profiles:307 screen-profiles:349
|
||||
#: screen-profiles:427
|
||||
#: screen-profiles:185 screen-profiles:308 screen-profiles:350
|
||||
#: screen-profiles:428
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:116 screen-profiles:143 screen-profiles:157
|
||||
#: screen-profiles:320 screen-profiles:374 screen-profiles:382
|
||||
#: screen-profiles:455
|
||||
#: screen-profiles:321 screen-profiles:375 screen-profiles:383
|
||||
#: screen-profiles:456
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
|
@ -82,7 +82,7 @@ msgid "Screen Profiles Help"
|
|||
msgstr ""
|
||||
|
||||
#: screen-profiles:134 screen-profiles:150 screen-profiles:185
|
||||
#: screen-profiles:307 screen-profiles:349 screen-profiles:427
|
||||
#: screen-profiles:308 screen-profiles:350 screen-profiles:428
|
||||
msgid "Apply"
|
||||
msgstr ""
|
||||
|
||||
|
@ -90,8 +90,8 @@ msgstr ""
|
|||
msgid "Which profile would you like to use?"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:142 screen-profiles:156 screen-profiles:319
|
||||
#: screen-profiles:381 screen-profiles:453
|
||||
#: screen-profiles:142 screen-profiles:156 screen-profiles:320
|
||||
#: screen-profiles:382 screen-profiles:454
|
||||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
|
@ -119,34 +119,34 @@ msgstr ""
|
|||
msgid "Create new window(s):"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:308
|
||||
#: screen-profiles:309
|
||||
msgid "Toggle status notifications:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:341
|
||||
#: screen-profiles:342
|
||||
msgid "Windows:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:351
|
||||
#: screen-profiles:352
|
||||
msgid "Select window(s) to create by default:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:371
|
||||
#: screen-profiles:372
|
||||
msgid "Screen will be launched automatically next time you login."
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:379
|
||||
#: screen-profiles:380
|
||||
msgid "Screen will not be used next time you login."
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:426
|
||||
#: screen-profiles:427
|
||||
msgid "Escape key: ctrl-"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:429
|
||||
#: screen-profiles:430
|
||||
msgid "Change escape sequence:"
|
||||
msgstr ""
|
||||
|
||||
#: screen-profiles:467
|
||||
#: screen-profiles:468
|
||||
msgid "<Tab>/<Alt-Tab> between elements | <Return> Validates"
|
||||
msgstr ""
|
||||
|
|
|
@ -41,8 +41,9 @@ backtick 110 86400 86400 /var/lib/screen-profiles/whoami
|
|||
backtick 111 86400 86400 /var/lib/screen-profiles/menu
|
||||
backtick 112 86400 86400 /var/lib/screen-profiles/arch
|
||||
backtick 113 30 30 /var/lib/screen-profiles/battery
|
||||
backtick 114 2 2 /var/lib/screen-profiles/users
|
||||
backtick 114 10 10 /var/lib/screen-profiles/users
|
||||
backtick 115 60 60 /var/lib/screen-profiles/uptime
|
||||
backtick 116 2 2 /var/lib/screen-profiles/processes
|
||||
|
||||
hardstatus alwayslastline
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ source /usr/share/screen-profiles/profiles/common
|
|||
caption always "%{kW}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kW}%?%+Lw%? %= %{= Wk}%110`%109`%111`"
|
||||
|
||||
# Status string, last line
|
||||
hardstatus string '%{= Wk}%99`%{= Wk} %100`%112`%= %115`%114`%108`%113`%102`%101`%106`%104`%103`%105`%107`%Y-%m-%d %0c:%s'
|
||||
hardstatus string '%{= Wk}%99`%{= Wk} %100`%112`%= %115`%114`%116`%108`%113`%102`%101`%106`%104`%103`%105`%107`%Y-%m-%d %0c:%s'
|
||||
|
||||
# NOTE: Older version of screen have an arbitrary limit of only being able
|
||||
# to change colors 16 times in this 'hardstatus string'.
|
||||
|
|
|
@ -257,6 +257,7 @@ def readstatus():
|
|||
status["mem-available"]=1
|
||||
status["mem-used"]=1
|
||||
status["menu"]=1
|
||||
status["processes"]=0
|
||||
status["reboot-required"]=1
|
||||
status["release"]=1
|
||||
status["updates-available"]=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue