bin/date, bin/time, screen-profiles-status, screen-profiles-export,

screen-profiles: allow for configuring on/off the date and time
status, LP: #359050
-Dustin Kirkland <kirkland@ubuntu.com>Thu, 16 Apr 2009 18:07:12 -0500
This commit is contained in:
Dustin Kirkland 2009-04-16 18:07:47 -05:00
commit 147346ec84
9 changed files with 65 additions and 59 deletions

6
debian/changelog vendored
View file

@ -1,8 +1,10 @@
screen-profiles (1.46) unreleased; urgency=low screen-profiles (1.46) unreleased; urgency=low
* UNRELEASED * bin/date, bin/time, screen-profiles-status, screen-profiles-export,
screen-profiles: allow for configuring on/off the date and time
status, LP: #359050
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Apr 2009 17:46:37 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Apr 2009 18:07:12 -0500
screen-profiles (1.45-0ubuntu1) jaunty; urgency=low screen-profiles (1.45-0ubuntu1) jaunty; urgency=low

View file

@ -3,13 +3,13 @@
# This file is distributed under the same license as the GNU Screen Profiles package. # This file is distributed under the same license as the GNU Screen Profiles package.
# Nicolas Valcarcel <nvalcarcel@ubuntu.com>, 2008. # Nicolas Valcarcel <nvalcarcel@ubuntu.com>, 2008.
# #
#: screen-profiles:304 #: screen-profiles:306
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 1.0\n" "Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-04-16 12:56-0500\n" "POT-Creation-Date: 2009-04-16 18:04-0500\n"
"PO-Revision-Date: 2008-12-22 01:01-0500\n" "PO-Revision-Date: 2008-12-22 01:01-0500\n"
"Last-Translator: Nicolas Valcarcel <nvalcarcel@ubuntu.com>\n" "Last-Translator: Nicolas Valcarcel <nvalcarcel@ubuntu.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -57,7 +57,7 @@ msgstr ""
msgid "Exit" msgid "Exit"
msgstr "" msgstr ""
#: screen-profiles:87 screen-profiles:470 #: screen-profiles:87 screen-profiles:472
msgid " Screen Profiles Configuration Menu" msgid " Screen Profiles Configuration Menu"
msgstr "" msgstr ""
@ -66,14 +66,14 @@ msgid "Okay"
msgstr "" msgstr ""
#: screen-profiles:98 screen-profiles:134 screen-profiles:150 #: screen-profiles:98 screen-profiles:134 screen-profiles:150
#: screen-profiles:185 screen-profiles:311 screen-profiles:353 #: screen-profiles:185 screen-profiles:313 screen-profiles:355
#: screen-profiles:431 #: screen-profiles:433
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: screen-profiles:116 screen-profiles:143 screen-profiles:157 #: screen-profiles:116 screen-profiles:143 screen-profiles:157
#: screen-profiles:324 screen-profiles:378 screen-profiles:386 #: screen-profiles:326 screen-profiles:380 screen-profiles:388
#: screen-profiles:459 #: screen-profiles:461
msgid "Menu" msgid "Menu"
msgstr "" msgstr ""
@ -82,7 +82,7 @@ msgid "Screen Profiles Help"
msgstr "" msgstr ""
#: screen-profiles:134 screen-profiles:150 screen-profiles:185 #: screen-profiles:134 screen-profiles:150 screen-profiles:185
#: screen-profiles:311 screen-profiles:353 screen-profiles:431 #: screen-profiles:313 screen-profiles:355 screen-profiles:433
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@ -90,8 +90,8 @@ msgstr ""
msgid "Which profile would you like to use?" msgid "Which profile would you like to use?"
msgstr "" msgstr ""
#: screen-profiles:142 screen-profiles:156 screen-profiles:323 #: screen-profiles:142 screen-profiles:156 screen-profiles:325
#: screen-profiles:385 screen-profiles:457 #: screen-profiles:387 screen-profiles:459
msgid "Message" msgid "Message"
msgstr "" msgstr ""
@ -119,35 +119,35 @@ msgstr ""
msgid "Create new window(s):" msgid "Create new window(s):"
msgstr "" msgstr ""
#: screen-profiles:312 #: screen-profiles:314
msgid "Toggle status notifications:" msgid "Toggle status notifications:"
msgstr "" msgstr ""
#: screen-profiles:345 #: screen-profiles:347
msgid "Windows:" msgid "Windows:"
msgstr "" msgstr ""
#: screen-profiles:355 #: screen-profiles:357
msgid "Select window(s) to create by default:" msgid "Select window(s) to create by default:"
msgstr "" msgstr ""
#: screen-profiles:375 #: screen-profiles:377
msgid "Screen will be launched automatically next time you login." msgid "Screen will be launched automatically next time you login."
msgstr "" msgstr ""
#: screen-profiles:383 #: screen-profiles:385
msgid "Screen will not be used next time you login." msgid "Screen will not be used next time you login."
msgstr "" msgstr ""
#: screen-profiles:430 #: screen-profiles:432
msgid "Escape key: ctrl-" msgid "Escape key: ctrl-"
msgstr "" msgstr ""
#: screen-profiles:433 #: screen-profiles:435
msgid "Change escape sequence:" msgid "Change escape sequence:"
msgstr "" msgstr ""
#: screen-profiles:471 #: screen-profiles:473
msgid "<Tab>/<Alt-Tab> between elements | <Return> Validates" msgid "<Tab>/<Alt-Tab> between elements | <Return> Validates"
msgstr "" msgstr ""

View file

@ -3,13 +3,13 @@
# This file is distributed under the same license as the GNU Screen Profiles package. # This file is distributed under the same license as the GNU Screen Profiles package.
# Nicolas Barcet <nicolas.barcet@ubuntu.com>, 2008. # Nicolas Barcet <nicolas.barcet@ubuntu.com>, 2008.
# #
#: screen-profiles:304 #: screen-profiles:306
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 1.0\n" "Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-04-16 12:56-0500\n" "POT-Creation-Date: 2009-04-16 18:04-0500\n"
"PO-Revision-Date: 2008-12-17 23:42+0100\n" "PO-Revision-Date: 2008-12-17 23:42+0100\n"
"Last-Translator: Nicolas Barcet <nicolas.barcet@ubuntu.com>\n" "Last-Translator: Nicolas Barcet <nicolas.barcet@ubuntu.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -57,7 +57,7 @@ msgstr ""
msgid "Exit" msgid "Exit"
msgstr "" msgstr ""
#: screen-profiles:87 screen-profiles:470 #: screen-profiles:87 screen-profiles:472
msgid " Screen Profiles Configuration Menu" msgid " Screen Profiles Configuration Menu"
msgstr "" msgstr ""
@ -66,14 +66,14 @@ msgid "Okay"
msgstr "" msgstr ""
#: screen-profiles:98 screen-profiles:134 screen-profiles:150 #: screen-profiles:98 screen-profiles:134 screen-profiles:150
#: screen-profiles:185 screen-profiles:311 screen-profiles:353 #: screen-profiles:185 screen-profiles:313 screen-profiles:355
#: screen-profiles:431 #: screen-profiles:433
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: screen-profiles:116 screen-profiles:143 screen-profiles:157 #: screen-profiles:116 screen-profiles:143 screen-profiles:157
#: screen-profiles:324 screen-profiles:378 screen-profiles:386 #: screen-profiles:326 screen-profiles:380 screen-profiles:388
#: screen-profiles:459 #: screen-profiles:461
msgid "Menu" msgid "Menu"
msgstr "" msgstr ""
@ -82,7 +82,7 @@ msgid "Screen Profiles Help"
msgstr "" msgstr ""
#: screen-profiles:134 screen-profiles:150 screen-profiles:185 #: screen-profiles:134 screen-profiles:150 screen-profiles:185
#: screen-profiles:311 screen-profiles:353 screen-profiles:431 #: screen-profiles:313 screen-profiles:355 screen-profiles:433
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@ -90,8 +90,8 @@ msgstr ""
msgid "Which profile would you like to use?" msgid "Which profile would you like to use?"
msgstr "" msgstr ""
#: screen-profiles:142 screen-profiles:156 screen-profiles:323 #: screen-profiles:142 screen-profiles:156 screen-profiles:325
#: screen-profiles:385 screen-profiles:457 #: screen-profiles:387 screen-profiles:459
msgid "Message" msgid "Message"
msgstr "" msgstr ""
@ -119,35 +119,35 @@ msgstr ""
msgid "Create new window(s):" msgid "Create new window(s):"
msgstr "" msgstr ""
#: screen-profiles:312 #: screen-profiles:314
msgid "Toggle status notifications:" msgid "Toggle status notifications:"
msgstr "" msgstr ""
#: screen-profiles:345 #: screen-profiles:347
msgid "Windows:" msgid "Windows:"
msgstr "" msgstr ""
#: screen-profiles:355 #: screen-profiles:357
msgid "Select window(s) to create by default:" msgid "Select window(s) to create by default:"
msgstr "" msgstr ""
#: screen-profiles:375 #: screen-profiles:377
msgid "Screen will be launched automatically next time you login." msgid "Screen will be launched automatically next time you login."
msgstr "" msgstr ""
#: screen-profiles:383 #: screen-profiles:385
msgid "Screen will not be used next time you login." msgid "Screen will not be used next time you login."
msgstr "" msgstr ""
#: screen-profiles:430 #: screen-profiles:432
msgid "Escape key: ctrl-" msgid "Escape key: ctrl-"
msgstr "" msgstr ""
#: screen-profiles:433 #: screen-profiles:435
msgid "Change escape sequence:" msgid "Change escape sequence:"
msgstr "" msgstr ""
#: screen-profiles:471 #: screen-profiles:473
msgid "<Tab>/<Alt-Tab> between elements | <Return> Validates" msgid "<Tab>/<Alt-Tab> between elements | <Return> Validates"
msgstr "" msgstr ""

View file

@ -3,13 +3,13 @@
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#: screen-profiles:304 #: screen-profiles:306
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-04-16 12:56-0500\n" "POT-Creation-Date: 2009-04-16 18:04-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -57,7 +57,7 @@ msgstr ""
msgid "Exit" msgid "Exit"
msgstr "" msgstr ""
#: screen-profiles:87 screen-profiles:470 #: screen-profiles:87 screen-profiles:472
msgid " Screen Profiles Configuration Menu" msgid " Screen Profiles Configuration Menu"
msgstr "" msgstr ""
@ -66,14 +66,14 @@ msgid "Okay"
msgstr "" msgstr ""
#: screen-profiles:98 screen-profiles:134 screen-profiles:150 #: screen-profiles:98 screen-profiles:134 screen-profiles:150
#: screen-profiles:185 screen-profiles:311 screen-profiles:353 #: screen-profiles:185 screen-profiles:313 screen-profiles:355
#: screen-profiles:431 #: screen-profiles:433
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: screen-profiles:116 screen-profiles:143 screen-profiles:157 #: screen-profiles:116 screen-profiles:143 screen-profiles:157
#: screen-profiles:324 screen-profiles:378 screen-profiles:386 #: screen-profiles:326 screen-profiles:380 screen-profiles:388
#: screen-profiles:459 #: screen-profiles:461
msgid "Menu" msgid "Menu"
msgstr "" msgstr ""
@ -82,7 +82,7 @@ msgid "Screen Profiles Help"
msgstr "" msgstr ""
#: screen-profiles:134 screen-profiles:150 screen-profiles:185 #: screen-profiles:134 screen-profiles:150 screen-profiles:185
#: screen-profiles:311 screen-profiles:353 screen-profiles:431 #: screen-profiles:313 screen-profiles:355 screen-profiles:433
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@ -90,8 +90,8 @@ msgstr ""
msgid "Which profile would you like to use?" msgid "Which profile would you like to use?"
msgstr "" msgstr ""
#: screen-profiles:142 screen-profiles:156 screen-profiles:323 #: screen-profiles:142 screen-profiles:156 screen-profiles:325
#: screen-profiles:385 screen-profiles:457 #: screen-profiles:387 screen-profiles:459
msgid "Message" msgid "Message"
msgstr "" msgstr ""
@ -119,34 +119,34 @@ msgstr ""
msgid "Create new window(s):" msgid "Create new window(s):"
msgstr "" msgstr ""
#: screen-profiles:312 #: screen-profiles:314
msgid "Toggle status notifications:" msgid "Toggle status notifications:"
msgstr "" msgstr ""
#: screen-profiles:345 #: screen-profiles:347
msgid "Windows:" msgid "Windows:"
msgstr "" msgstr ""
#: screen-profiles:355 #: screen-profiles:357
msgid "Select window(s) to create by default:" msgid "Select window(s) to create by default:"
msgstr "" msgstr ""
#: screen-profiles:375 #: screen-profiles:377
msgid "Screen will be launched automatically next time you login." msgid "Screen will be launched automatically next time you login."
msgstr "" msgstr ""
#: screen-profiles:383 #: screen-profiles:385
msgid "Screen will not be used next time you login." msgid "Screen will not be used next time you login."
msgstr "" msgstr ""
#: screen-profiles:430 #: screen-profiles:432
msgid "Escape key: ctrl-" msgid "Escape key: ctrl-"
msgstr "" msgstr ""
#: screen-profiles:433 #: screen-profiles:435
msgid "Change escape sequence:" msgid "Change escape sequence:"
msgstr "" msgstr ""
#: screen-profiles:471 #: screen-profiles:473
msgid "<Tab>/<Alt-Tab> between elements | <Return> Validates" msgid "<Tab>/<Alt-Tab> between elements | <Return> Validates"
msgstr "" msgstr ""

View file

@ -47,6 +47,8 @@ backtick 116 2 2 screen-profiles-status processes
backtick 117 2 2 screen-profiles-status network-up backtick 117 2 2 screen-profiles-status network-up
backtick 118 2 2 screen-profiles-status network-down backtick 118 2 2 screen-profiles-status network-down
backtick 119 2 2 screen-profiles-status wifi-quality backtick 119 2 2 screen-profiles-status wifi-quality
backtick 120 86400 86400 screen-profiles-status date
backtick 121 86400 86400 screen-profiles-status time
hardstatus alwayslastline hardstatus alwayslastline

View file

@ -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`" caption always "%{kW}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kW}%?%+Lw%? %= %{= Wk}%110`%109`%111`"
# Status string, last line # Status string, last line
hardstatus string '%99`%{= Wk} %100`%112`%= %102`%101`%114`%115`%108`%113`%119`%117`%118`%116`%106`%104`%103`%105`%107`%Y-%m-%d %0c:%s' hardstatus string '%99`%{= Wk} %100`%112`%= %102`%101`%114`%115`%108`%113`%119`%117`%118`%116`%106`%104`%103`%105`%107`%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'.

View file

@ -250,6 +250,7 @@ def readstatus():
status["battery"]=0 status["battery"]=0
status["cpu-count"]=1 status["cpu-count"]=1
status["cpu-freq"]=1 status["cpu-freq"]=1
status["date"]=1
status["ec2-cost"]=0 status["ec2-cost"]=0
status["hostname"]=0 status["hostname"]=0
status["load-average"]=1 status["load-average"]=1
@ -262,6 +263,7 @@ def readstatus():
status["processes"]=0 status["processes"]=0
status["reboot-required"]=1 status["reboot-required"]=1
status["release"]=1 status["release"]=1
status["time"]=1
status["users"]=0 status["users"]=0
status["updates-available"]=1 status["updates-available"]=1
status["uptime"]=0 status["uptime"]=0

View file

@ -88,7 +88,7 @@ status_config() {
# Enable user@host in its place # Enable user@host in its place
for i in $(ls /var/lib/screen-profiles/); do for i in $(ls /var/lib/screen-profiles/); do
case "$i" in case "$i" in
cpu-count|cpu-freq|hostname|load-average|logo|mem-available|mem-used|reboot-required|release|updates-available|whoami) cpu-count|cpu-freq|date|hostname|load-average|logo|mem-available|mem-used|reboot-required|release|time|updates-available|whoami)
echo "$i=1" echo "$i=1"
;; ;;
*) *)

View file

@ -38,7 +38,7 @@ P="$1"
case "$P" in case "$P" in
# default = on, user must override to turn off # default = on, user must override to turn off
cpu-count|cpu-freq|load-average|logo|mem-available|mem-used|menu|reboot-required|release|updates-available) cpu-count|cpu-freq|date|load-average|logo|mem-available|mem-used|menu|reboot-required|release|time|updates-available)
grep -qs "^$P=0$" "$HOME/.screen-profiles/status" && exit 0 grep -qs "^$P=0$" "$HOME/.screen-profiles/status" && exit 0
;; ;;
# default = off, user must override to turn on # default = off, user must override to turn on