mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 14:03:18 -07:00
* Key binding framework basis
* Added some sensible key bindings * First pot and translation to french
This commit is contained in:
parent
b272c7ad63
commit
5ee3089853
7 changed files with 133 additions and 35 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -10,5 +10,8 @@ screen-profiles (1.0) UNRELEASED; urgency=low
|
|||
[ Nicolas Barcet ]
|
||||
* Allow local modification of .screenrc (LP: #308216)
|
||||
* Add some nice defaults to ubuntu.screenrc
|
||||
* Key binding framework basis
|
||||
* Added some sensible key bindings
|
||||
* First pot and translation to french
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 16 Dec 2008 15:31:47 -0600
|
||||
|
|
45
doc/help.txt
45
doc/help.txt
|
@ -1,29 +1,24 @@
|
|||
Screen key bindings, page 1 of 1.
|
||||
Command key: ^A Literal ^A: a
|
||||
********************************************
|
||||
** Welcome to the screen powered terminal **
|
||||
********************************************
|
||||
The main benefits of the screen program is that your session can have
|
||||
multiple windows and keep context between multiple logins. You will also
|
||||
notice the task bar at the bottom that informs you of various system
|
||||
status, update waiting to be applied and which window you are currently
|
||||
running on.
|
||||
|
||||
break ^B b license , removebuf =
|
||||
clear C lockscreen ^X x reset Z
|
||||
colon : log H screen ^C c
|
||||
copy ^[ [ login L select '
|
||||
detach ^D d meta a silence _
|
||||
digraph ^V monitor M split S
|
||||
displays * next ^@ ^N sp n suspend ^Z z
|
||||
dumptermcap . number N time ^T t
|
||||
fit F only Q title A
|
||||
flow ^F f other ^A vbell ^G
|
||||
focus ^I pow_break B version v
|
||||
hardcopy h pow_detach D width W
|
||||
help ? prev ^H ^P p ^? windows ^W w
|
||||
history { } quit \ wrap ^R r
|
||||
info i readbuf < writebuf >
|
||||
kill K k redisplay ^L l xoff ^S s
|
||||
lastmsg ^M m remove X xon ^Q q
|
||||
A complete help on the screen program can be obtained using the 'man screen'
|
||||
command. Note that our implementation remaps the escape prefix to ctrl-G
|
||||
instead of the standard ctrl-A.
|
||||
|
||||
paste . ^] windowlist " select - -
|
||||
select 0 0 select 1 1 select 2 2
|
||||
select 3 3 select 4 4 select 5 5
|
||||
select 6 6 select 7 7 select 8 8
|
||||
select 9 9 login on I login off O
|
||||
paste . ] split -v | focus up :kB:
|
||||
Some usefull mappings (where C- means ctrl):
|
||||
-------------------------------------------------------------------
|
||||
shift-tab Goto next window | F1 Basic help (this)
|
||||
C-pgup Goto previous window | F2 Advanced help
|
||||
C-pgdown Goto next window | F4 Create new window
|
||||
C-shift-del Detach and logout | F6 Close current window
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Note that these bindings have been tested for xterm type terminal such as
|
||||
gnome-terminal, but may need some adjustments elsewhere.
|
||||
|
||||
|
|
33
po/fr.po
Normal file
33
po/fr.po
Normal file
|
@ -0,0 +1,33 @@
|
|||
# GNU Screen Profiles
|
||||
# Copyright (C) 2008 Dustin Kirkland
|
||||
# This file is distributed under the same license as the GNU Screen Profiles package.
|
||||
# Nicolas Barcet <nicolas.barcet@ubuntu.com>, 2008.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-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"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: select-screen-profile:9 select-screen-profile:16
|
||||
msgid "Error:"
|
||||
msgstr "Erreur:"
|
||||
|
||||
#: select-screen-profile:9 select-screen-profile:16
|
||||
msgid "exists, but is not a symlink"
|
||||
msgstr "existe, mais n'est pas un lien symbolique"
|
||||
|
||||
#: select-screen-profile:30
|
||||
msgid "recommended"
|
||||
msgstr "recommandé"
|
||||
|
||||
#: select-screen-profile:41 select-screen-profile:43
|
||||
msgid "Choose"
|
||||
msgstr "Choisir"
|
33
po/screen-profiles.pot
Normal file
33
po/screen-profiles.pot
Normal file
|
@ -0,0 +1,33 @@
|
|||
# GNU Screen Profiles
|
||||
# Copyright (C) 2008 Dustin Kirkland
|
||||
# This file is distributed under the same license as the GNU Screen Profiles package.
|
||||
# Nicolas Barcet <nicolas.barcet@ubuntu.com>, 2008.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2008-12-17 23:42+0100\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"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: select-screen-profile.sh:9 select-screen-profile.sh:16
|
||||
msgid "Error:"
|
||||
msgstr ""
|
||||
|
||||
#: select-screen-profile.sh:9 select-screen-profile.sh:16
|
||||
msgid "exists, but is not a symlink"
|
||||
msgstr ""
|
||||
|
||||
#: select-screen-profile.sh:30
|
||||
msgid "recommended"
|
||||
msgstr ""
|
||||
|
||||
#: select-screen-profile.sh:41 select-screen-profile.sh:43
|
||||
msgid "Choose"
|
||||
msgstr ""
|
|
@ -34,13 +34,3 @@ hardstatus alwayslastline
|
|||
termcapinfo xterm ti@:te@
|
||||
defscrollback 10000
|
||||
|
||||
# Keybindings
|
||||
# Map shift-tab to go to next window
|
||||
bindkey "\033[Z" next
|
||||
# Ctrl+PgUp and Ctrl+PgDn to change windows
|
||||
bindkey ^[[5;5~ prev
|
||||
bindkey ^[[6;5~ next
|
||||
# Prompt for window title on "ctrl-a c"
|
||||
register n "^a^c ^aA"
|
||||
bind c process n
|
||||
|
||||
|
|
24
profiles/ubuntu.key
Normal file
24
profiles/ubuntu.key
Normal file
|
@ -0,0 +1,24 @@
|
|||
# This file defines Key bindings
|
||||
# bindkey commands should be followed by a comment that will be used in the
|
||||
# help file (one day). The command should be formated as:
|
||||
# <keys> | explanation
|
||||
|
||||
escape ^Gg
|
||||
|
||||
# Maps for next and previous windows
|
||||
bindkey "\033[Z" next # Shift-tab | next window
|
||||
bindkey ^[[6;5~ prev # Ctrl-pgup | previous window
|
||||
bindkey ^[[5;5~ next # Ctrl-pgdn | next window
|
||||
|
||||
# Maps to create and remove windows
|
||||
register n "^g^c ^gA"
|
||||
bindkey -k k4 process n # F4 | create new window
|
||||
bindkey -k k6 kill # F6 | close window
|
||||
|
||||
# Maps for help
|
||||
bindkey -k k1 less /usr/share/doc/screen-profiles/help.txt # F1 | Basic help
|
||||
bindkey -k k2 help # F2 | Advanced help
|
||||
|
||||
# power detach
|
||||
register x "^g^d D"
|
||||
bindkey ^[[3;6~ process x # shift-ctrl-del | Detach and logout
|
|
@ -10,6 +10,13 @@ if [ -e "$HOME/.screenrc-profile" ]; then
|
|||
exit 1
|
||||
fi
|
||||
fi
|
||||
# Ensure that ~/.screenrc-key is a symbolic link
|
||||
if [ -e "$HOME/.screenrc-key" ]; then
|
||||
>---if [ ! -L "$HOME/.screenrc-key" ]; then
|
||||
>--->---echo `gettext 'Error:'` $HOME/.screenrc-key `gettext 'exists, but is not a symlink'`
|
||||
>--->---exit 1
|
||||
>---fi
|
||||
fi
|
||||
|
||||
# Prompt the user to choose among the available profiles
|
||||
echo
|
||||
|
@ -46,6 +53,7 @@ for x in $profiles; do
|
|||
if [ ! -e "$HOME/.screenrc" ]; then
|
||||
# If the user doesn't have a .screenrc, seed one
|
||||
echo "source ~/.screenrc-profile" > "$HOME/.screenrc"
|
||||
echo "source ~/.screenrc-key" >> "$HOME/.screenrc"
|
||||
else
|
||||
# If the user does have a .screenrc, see if it has the
|
||||
# source line
|
||||
|
@ -57,9 +65,21 @@ for x in $profiles; do
|
|||
cat "$HOME/.screenrc" >> "$tmp"
|
||||
mv -f "$tmp" "$HOME/.screenrc"
|
||||
fi
|
||||
>--->--->---# If the user does have a .screenrc, see if it has the second
|
||||
>--->--->---# source line
|
||||
>--->--->---if ! grep -qs "source $HOME/.screenrc-key" "$HOME/.screenrc"; then
|
||||
>--->--->--->---# And if it's missing the source line, add it
|
||||
>--->--->--->---# to the top
|
||||
>--->--->--->---tmp=`mktemp "$HOME/.screenrc.XXXXXX"`
|
||||
>--->--->--->---echo "source $HOME/.screenrc-key" > "$tmp"
|
||||
>--->--->--->---cat "$HOME/.screenrc" >> "$tmp"
|
||||
>--->--->--->---mv -f "$tmp" "$HOME/.screenrc"
|
||||
>--->--->---fi
|
||||
fi
|
||||
rm -f "$HOME/.screenrc-profile"
|
||||
rm -f "$HOME/.screenrc-key"
|
||||
ln -s "$PROFILE_DIR/$x" "$HOME/.screenrc-profile"
|
||||
ln -s "$PROFILE_DIR/ubuntu.key" "$HOME/.screenrc-key"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue