mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
screen-profiles-helper renamed to screen-profiles; updated all references
This commit is contained in:
parent
0d71ca52d9
commit
64cdf1d8f7
8 changed files with 51 additions and 71 deletions
16
debian/changelog
vendored
16
debian/changelog
vendored
|
@ -1,4 +1,4 @@
|
||||||
screen-profiles (1.20) UNRELEASED; urgency=low
|
screen-profiles (1.20-0ubuntu1) jaunty; urgency=low
|
||||||
|
|
||||||
* profiles/logos/*: remove unneeded trailing formatting
|
* profiles/logos/*: remove unneeded trailing formatting
|
||||||
* screen-launcher-install: no longer need the pruning code, since we just
|
* screen-launcher-install: no longer need the pruning code, since we just
|
||||||
|
@ -8,8 +8,20 @@ screen-profiles (1.20) UNRELEASED; urgency=low
|
||||||
estimating ec2 cost
|
estimating ec2 cost
|
||||||
* bin/updates-available: write out local cache of updates available; add !
|
* bin/updates-available: write out local cache of updates available; add !
|
||||||
only if there are security updates
|
only if there are security updates
|
||||||
|
* debian/rules: drop po4a rule, no longer valid
|
||||||
|
* screen-profiles-helper renamed to screen-profiles; updated all references
|
||||||
|
LP: #315886
|
||||||
|
* select-screen-profile, screen-profiles: update translation handling
|
||||||
|
and inline documentation
|
||||||
|
* bin/reboot-required: simplified
|
||||||
|
* bin/cpu-freq: simplified, made more efficient
|
||||||
|
* bin/cpu-count: simplified
|
||||||
|
* bin/ec2-cost: exit immediately if not running in EC2
|
||||||
|
* profiles/common: run cpu-freq, mem-used, and reboot-required every 2
|
||||||
|
seconds (as these are cheap and dynamic)
|
||||||
|
* profiles/skel: add ec2-cost to status bar
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 05 Feb 2009 00:27:16 +0100
|
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 09 Feb 2009 15:07:29 -0600
|
||||||
|
|
||||||
screen-profiles (1.19-0ubuntu1) jaunty; urgency=low
|
screen-profiles (1.19-0ubuntu1) jaunty; urgency=low
|
||||||
|
|
||||||
|
|
2
debian/install
vendored
2
debian/install
vendored
|
@ -21,7 +21,7 @@ keybindings/none usr/share/screen-profiles/keybindings
|
||||||
windows/common usr/share/screen-profiles/windows
|
windows/common usr/share/screen-profiles/windows
|
||||||
screen usr/bin
|
screen usr/bin
|
||||||
select-screen-profile usr/bin
|
select-screen-profile usr/bin
|
||||||
screen-profiles-helper usr/bin
|
screen-profiles usr/bin
|
||||||
screen-launcher-install usr/share/screen-profiles/
|
screen-launcher-install usr/share/screen-profiles/
|
||||||
screen-launcher-uninstall usr/share/screen-profiles/
|
screen-launcher-uninstall usr/share/screen-profiles/
|
||||||
screen-launcher usr/bin/
|
screen-launcher usr/bin/
|
||||||
|
|
8
debian/rules
vendored
8
debian/rules
vendored
|
@ -14,8 +14,12 @@ get-orig-source:
|
||||||
./profiles/generate-profiles
|
./profiles/generate-profiles
|
||||||
tar -C ../ --exclude .bzr --exclude debian -zcvf ../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER}
|
tar -C ../ --exclude .bzr --exclude debian -zcvf ../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER}
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
prebuild:
|
prebuild:
|
||||||
cd po4a && po4a --no-backups po4a.conf
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
||||||
|
@ -35,7 +39,7 @@ binary-indep: build install
|
||||||
dh_testdir -i
|
dh_testdir -i
|
||||||
dh_testroot -i
|
dh_testroot -i
|
||||||
dh_installdocs -X.bzr -i
|
dh_installdocs -X.bzr -i
|
||||||
dh_installman -i screen-launcher.1 screen-profiles-helper.1 select-screen-profile.1
|
dh_installman -i screen-launcher.1 screen-profiles.1 select-screen-profile.1
|
||||||
dh_installchangelogs -i README
|
dh_installchangelogs -i README
|
||||||
dh_installdebconf -i
|
dh_installdebconf -i
|
||||||
dh_compress -i
|
dh_compress -i
|
||||||
|
|
|
@ -40,7 +40,7 @@ bindkey -k k5 kill # F5 | Close window
|
||||||
bindkey -k k6 detach # F6 | Detach from this session
|
bindkey -k k6 detach # F6 | Detach from this session
|
||||||
bindkey -k k7 copy # F7 | Enter copy/scrollback mode
|
bindkey -k k7 copy # F7 | Enter copy/scrollback mode
|
||||||
bindkey -k k8 help # F8 | Advanced help/keybindings
|
bindkey -k k8 help # F8 | Advanced help/keybindings
|
||||||
bindkey -k k9 screen -t help 0 screen-profiles-helper # F9 | Welcome screen
|
bindkey -k k9 screen -t help 0 screen-profiles # F9 | Configuration
|
||||||
# F10 | 'toolbar' in gnome-terminal
|
# F10 | 'toolbar' in gnome-terminal
|
||||||
# F11 | 'fullscreen' in gnome-terminal
|
# F11 | 'fullscreen' in gnome-terminal
|
||||||
bindkey -k F2 lockscreen # F12 | Lock this terminal
|
bindkey -k F2 lockscreen # F12 | Lock this terminal
|
||||||
|
|
|
@ -5,12 +5,12 @@ screen\-launcher \- Screen Launcher
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
\fBscreen\-launcher\fP is a simple application that will launch "screen", reconnecting to an existing detached session (if available).
|
\fBscreen\-launcher\fP is a simple application that will launch "screen", reconnecting to an existing detached session (if available).
|
||||||
|
|
||||||
This script exists for simple insertion and removal from a user's ~/.screenrc file, by the \fBscreen\-profiles\-helper\fP utility.
|
This script exists for simple insertion and removal from a user's ~/.screenrc file, by the \fBscreen\-profiles\fP utility.
|
||||||
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.PD 0
|
.PD 0
|
||||||
.TP
|
.TP
|
||||||
\fBscreen\fP(1), \fBscreen\-profiles\-helper\fP(1)
|
\fBscreen\fP(1), \fBscreen\-profiles\fP(1)
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fIhttp://launchpad.net/screen-profiles\fP
|
\fIhttp://launchpad.net/screen-profiles\fP
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
#
|
#
|
||||||
# screen-profiles-helper
|
# screen-profiles
|
||||||
# Copyright (C) 2008 Canonical Ltd.
|
# Copyright (C) 2008 Canonical Ltd.
|
||||||
#
|
#
|
||||||
# Authors: Nick Barcet <nick.barcet@ubuntu.com>
|
# Authors: Nick Barcet <nick.barcet@ubuntu.com>
|
||||||
|
@ -18,6 +18,10 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# If you change any strings, please generate localization information with:
|
||||||
|
# ./debian/rules get-po
|
||||||
|
|
||||||
|
|
||||||
import sys, os, os.path, time, string, commands, gettext
|
import sys, os, os.path, time, string, commands, gettext
|
||||||
from ConfigParser import SafeConfigParser
|
from ConfigParser import SafeConfigParser
|
||||||
from snack import *
|
from snack import *
|
||||||
|
@ -27,8 +31,8 @@ SHARE='/usr/share/screen-profiles'
|
||||||
DOC='/usr/share/doc/screen-profiles'
|
DOC='/usr/share/doc/screen-profiles'
|
||||||
DEF_ESC="A"
|
DEF_ESC="A"
|
||||||
|
|
||||||
gettext.bindtextdomain('screen-profiles-helper', SHARE+'/po')
|
gettext.bindtextdomain('screen-profiles', SHARE+'/po')
|
||||||
gettext.textdomain('screen-profiles-helper')
|
gettext.textdomain('screen-profiles')
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
# Command presets for windows creation
|
# Command presets for windows creation
|
||||||
|
@ -76,9 +80,9 @@ def menu(screen, size, isInstalled):
|
||||||
li.append(_("Create new window(s)"), 5)
|
li.append(_("Create new window(s)"), 5)
|
||||||
li.append(_("Manage default windows"), 6)
|
li.append(_("Manage default windows"), 6)
|
||||||
li.append(installtext, 7)
|
li.append(installtext, 7)
|
||||||
bb = ButtonBar(screen, ((_("Ok"), "ok"), (_("Exit"), "exit")), compact = 1)
|
bb = ButtonBar(screen, ((_("Okay"), "okay"), (_("Exit"), "exit")), compact = 1)
|
||||||
|
|
||||||
g = GridForm(screen, _("Screen Profiles Menu"), 1, 2)
|
g = GridForm(screen, _(" Screen Profiles Configuration"), 1, 2)
|
||||||
g.add(li, 0, 0, padding=(4,2,4,2))
|
g.add(li, 0, 0, padding=(4,2,4,2))
|
||||||
g.add(bb, 0, 1, padding=(1,1,0,0))
|
g.add(bb, 0, 1, padding=(1,1,0,0))
|
||||||
|
|
||||||
|
@ -89,7 +93,7 @@ def menu(screen, size, isInstalled):
|
||||||
|
|
||||||
def messagebox(screen, width, height, title, text, \
|
def messagebox(screen, width, height, title, text, \
|
||||||
scroll=0, \
|
scroll=0, \
|
||||||
buttons=((_("Ok"), "ok"),(_("Cancel"), "cancel")) ):
|
buttons=((_("Okay"), "okay"),(_("Cancel"), "cancel")) ):
|
||||||
|
|
||||||
t = Textbox(width, height, text, scroll=scroll )
|
t = Textbox(width, height, text, scroll=scroll )
|
||||||
bb = ButtonBar(screen, buttons, compact = 1)
|
bb = ButtonBar(screen, buttons, compact = 1)
|
||||||
|
@ -106,47 +110,18 @@ def help(screen, size, config):
|
||||||
|
|
||||||
text=text.replace("<esckey>", getesckey(), 1)
|
text=text.replace("<esckey>", getesckey(), 1)
|
||||||
|
|
||||||
t = Textbox(74, 19, text, scroll=1)
|
t = Textbox(70, 16, text, scroll=1)
|
||||||
bb = ButtonBar(screen, ((_("Menu"), "menu"), (_("Exit"), "exit")), compact = 1)
|
bb = ButtonBar(screen, ((_("Back"), )), compact = 1)
|
||||||
|
|
||||||
try:
|
|
||||||
if (config.get('Defaults', 'help') == "on"):
|
|
||||||
cbOn = 1
|
|
||||||
else:
|
|
||||||
cbOn = 0
|
|
||||||
except:
|
|
||||||
cbOn = 1
|
|
||||||
|
|
||||||
cb=Checkbox(_("Display this help on startup"), isOn=cbOn)
|
|
||||||
|
|
||||||
g = GridForm(screen, _("Screen Profiles Help"), 1, 3)
|
g = GridForm(screen, _("Screen Profiles Help"), 1, 3)
|
||||||
g.add(t, 0, 0, padding=(0,0,0,0))
|
g.add(t, 0, 0, padding=(0,0,0,0))
|
||||||
g.add(cb, 0, 1, padding=(1,0,0,0))
|
|
||||||
g.add(bb, 0, 2, padding=(1,1,0,0))
|
g.add(bb, 0, 2, padding=(1,1,0,0))
|
||||||
|
|
||||||
button = bb.buttonPressed(g.runOnce())
|
button = bb.buttonPressed(g.runOnce())
|
||||||
|
|
||||||
if cb.value() != cbOn:
|
if button != "Back":
|
||||||
#Check box value has change, write config file
|
|
||||||
if not config.has_section('Defaults'):
|
|
||||||
config.add_section('Defaults')
|
|
||||||
|
|
||||||
if cb.value() == 1:
|
|
||||||
value = "on"
|
|
||||||
else:
|
|
||||||
value = "off"
|
|
||||||
|
|
||||||
config.set('Defaults','help',value)
|
|
||||||
configfile=open(HOME+'/.screen-profiles-helper', 'wb')
|
|
||||||
try:
|
|
||||||
config.write(configfile)
|
|
||||||
finally:
|
|
||||||
configfile.close()
|
|
||||||
|
|
||||||
if button == "exit":
|
|
||||||
return 0
|
|
||||||
else:
|
|
||||||
return 100
|
return 100
|
||||||
|
else:
|
||||||
|
return 0
|
||||||
|
|
||||||
def profile(screen, size):
|
def profile(screen, size):
|
||||||
li = Listbox(height = 6, width = 60, returnExit = 1)
|
li = Listbox(height = 6, width = 60, returnExit = 1)
|
||||||
|
@ -166,7 +141,7 @@ def profile(screen, size):
|
||||||
if bb.buttonPressed(g.runOnce()) != "cancel":
|
if bb.buttonPressed(g.runOnce()) != "cancel":
|
||||||
commands.getoutput('select-screen-profile --set %s' % li.current())
|
commands.getoutput('select-screen-profile --set %s' % li.current())
|
||||||
button = messagebox(screen, 60, 2, _("Message"), _("Restart screen to apply the new profile"), \
|
button = messagebox(screen, 60, 2, _("Message"), _("Restart screen to apply the new profile"), \
|
||||||
buttons=((_("Ok"),"ok"), (_("Exit"), "exit")) )
|
buttons=((_("Okay"),"okay"), (_("Exit"), "exit")) )
|
||||||
if button == "exit":
|
if button == "exit":
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -183,7 +158,7 @@ def keybindings(screen, size):
|
||||||
if bb.buttonPressed(g.runOnce()) != "cancel":
|
if bb.buttonPressed(g.runOnce()) != "cancel":
|
||||||
switch_keybindings(li.current())
|
switch_keybindings(li.current())
|
||||||
button = messagebox(screen, 60, 2, _("Message"), _("Restart screen to apply the new keybindings"), \
|
button = messagebox(screen, 60, 2, _("Message"), _("Restart screen to apply the new keybindings"), \
|
||||||
buttons=((_("Ok"),"ok"), (_("Exit"), "exit")) )
|
buttons=((_("Okay"),"okay"), (_("Exit"), "exit")) )
|
||||||
if button == "exit":
|
if button == "exit":
|
||||||
return 0
|
return 0
|
||||||
return 100
|
return 100
|
||||||
|
@ -327,7 +302,7 @@ def install(screen, size, isInstalled):
|
||||||
out = _("Screen will be launched automatically next time you login.")
|
out = _("Screen will be launched automatically next time you login.")
|
||||||
|
|
||||||
button = messagebox(screen, 60, 2, "Message", out, \
|
button = messagebox(screen, 60, 2, "Message", out, \
|
||||||
buttons=((_("Ok"),"ok"), (_("Exit"), "exit")) )
|
buttons=((_("Okay"),"okay"), (_("Exit"), "exit")) )
|
||||||
if button == "exit":
|
if button == "exit":
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -338,7 +313,7 @@ def install(screen, size, isInstalled):
|
||||||
out = _("Screen will not be used next time you login.")
|
out = _("Screen will not be used next time you login.")
|
||||||
|
|
||||||
button = messagebox(screen, 60, 2, _("Message"), out, \
|
button = messagebox(screen, 60, 2, _("Message"), out, \
|
||||||
buttons=((_("Ok"),"ok"), (_("Exit"), "exit")) )
|
buttons=((_("Okay"),"okay"), (_("Exit"), "exit")) )
|
||||||
if button == "exit":
|
if button == "exit":
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -413,35 +388,24 @@ def chgesc(screen, size):
|
||||||
setesckey(esc.value())
|
setesckey(esc.value())
|
||||||
button = messagebox(screen, 60, 2, _("Message"), \
|
button = messagebox(screen, 60, 2, _("Message"), \
|
||||||
_("Restart screen to enact your changes."), \
|
_("Restart screen to enact your changes."), \
|
||||||
buttons=((_("Ok"),"ok"), (_("Exit"), "exit")) )
|
buttons=((_("Okay"),"okay"), (_("Exit"), "exit")) )
|
||||||
if button == "exit":
|
if button == "exit":
|
||||||
return 0
|
return 0
|
||||||
return 100
|
return 100
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""This is the main loop of our screen helper.
|
"""This is the main loop of our screen-profiles utility
|
||||||
"""
|
"""
|
||||||
|
|
||||||
size = terminal_size()
|
size = terminal_size()
|
||||||
screen = SnackScreen()
|
screen = SnackScreen()
|
||||||
screen.drawRootText(1,0,_('Screen Profiles Helper'))
|
screen.drawRootText(1,0,_(' Screen Profiles Configuration'))
|
||||||
screen.pushHelpLine(_('<Tab>/<Alt-Tab> between elements | <Return> Validates'))
|
screen.pushHelpLine(_('<Tab>/<Alt-Tab> between elements | <Return> Validates'))
|
||||||
|
|
||||||
config = SafeConfigParser()
|
config = SafeConfigParser()
|
||||||
try:
|
|
||||||
config.read(HOME+'/.screen-profiles-helper')
|
|
||||||
if config.has_option('Defaults', 'help'):
|
|
||||||
showhelp=config.get('Defaults', 'help')
|
|
||||||
else:
|
|
||||||
showhelp="on"
|
|
||||||
except:
|
|
||||||
showhelp="on"
|
|
||||||
|
|
||||||
isInstalled = (commands.getoutput('grep screen-launcher '+(HOME+'/.profile')) != "")
|
isInstalled = (commands.getoutput('grep screen-launcher '+(HOME+'/.profile')) != "")
|
||||||
|
|
||||||
if showhelp == "on" :
|
|
||||||
tag = help(screen, size, config)
|
|
||||||
else:
|
|
||||||
tag = 100
|
tag = 100
|
||||||
|
|
||||||
while tag > 0 :
|
while tag > 0 :
|
|
@ -1,9 +1,9 @@
|
||||||
.TH screen\-profiles\-helper 1 "16 Jan 2009" screen-profiles "screen-profiles"
|
.TH screen\-profiles 1 "16 Jan 2009" screen-profiles "screen-profiles"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
screen\-profiles\-helper \- Configuration utility for screen\-profiles
|
screen\-profiles \- Configuration utility for screen\-profiles
|
||||||
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
\fBscreen\-profiles\-helper\fP is an application that can configure a number of options available in the screen\-profiles utility.
|
\fBscreen\-profiles\fP is an application that can configure a number of options available in the screen\-profiles utility.
|
||||||
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.PD 0
|
.PD 0
|
|
@ -1,4 +1,4 @@
|
||||||
# Default windows
|
# Default windows
|
||||||
screen -t shell 3
|
screen -t shell 3
|
||||||
screen -t MOTD 2 watch -n 300 cat /etc/motd
|
screen -t MOTD 2 watch -n 300 cat /etc/motd
|
||||||
screen -t welcome 1 screen-profiles-helper
|
screen -t welcome 1 screen-profiles
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue