From c72240eef4a68b514cefc4398db110549c9cb50b Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 10 May 2011 14:34:49 +0200 Subject: [PATCH] - use ctrl-^ as the default escape character * usr/share/byobu/profiles/common: fix printscreen screen exchange file --- debian/changelog | 3 ++- usr/bin/byobu-config | 2 +- usr/bin/byobu-ctrl-a | 2 +- usr/share/byobu/keybindings/f-keys | 16 ++++++++-------- usr/share/byobu/profiles/common | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index ed901361..380f0011 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,7 @@ byobu (3.35c) unreleased; urgency=low usr/share/byobu/keybindings/screen-escape-keys, usr/share/doc/byobu/help.txt, usr/bin/Makefile.am, usr/bin/byobu-ctrl-a: LP: #776743 - - use ASCII 16 (data link escape) as the escape character + - use ctrl-^ as the default escape character - bind F12 to printing the escape character - adjust everything accordingly * usr/share/byobu/keybindings/f-keys, @@ -43,6 +43,7 @@ byobu (3.35c) unreleased; urgency=low variable, that ssh clients could export and globally disable launching byobu on ssh logins (note that this will require whitelisting that variable on the ssh client and server) + * usr/share/byobu/profiles/common: fix printscreen screen exchange file -- Dustin Kirkland Tue, 03 May 2011 12:11:10 -0500 diff --git a/usr/bin/byobu-config b/usr/bin/byobu-config index 31fe651d..64f4c6ea 100755 --- a/usr/bin/byobu-config +++ b/usr/bin/byobu-config @@ -484,7 +484,7 @@ def setesckey(key): out = commands.getoutput(SED+" -i -e 's/^register.*$//' "+path) out = commands.getoutput("grep -h ^register "+SHARE+"/keybindings/*keys") appendtofile(path, out+"\n") - out = commands.getoutput(SED+" -i -e 's/\"\\020/\"\^"+l+"/g' "+path) + out = commands.getoutput(SED+" -i -e 's/\"^^/\"\^"+l+"/g' "+path) out = commands.getoutput(SED+" -i -e '/^$/d' "+path) def chgesc(screen, size): diff --git a/usr/bin/byobu-ctrl-a b/usr/bin/byobu-ctrl-a index 3b1ab721..3d33c6b9 100755 --- a/usr/bin/byobu-ctrl-a +++ b/usr/bin/byobu-ctrl-a @@ -46,7 +46,7 @@ while true; do ;; 2) sed -i -e "/^register a /d" -e "/^bindkey \"^A\"/d" "$keybindings" - echo 'register a "\\020"' >> "$keybindings" + echo 'register a "^^"' >> "$keybindings" echo 'bindkey "^A" process a' >> "$keybindings" echo "INFO: ctrl-a will now operate in screen mode" break diff --git a/usr/share/byobu/keybindings/f-keys b/usr/share/byobu/keybindings/f-keys index 4e4c03cf..d6651e0a 100644 --- a/usr/share/byobu/keybindings/f-keys +++ b/usr/share/byobu/keybindings/f-keys @@ -19,9 +19,9 @@ # along with this program. If not, see . ############################################################################### -# Byobu's escape key is ASCII Dec:16, Hex:10, Oct:020, Char:DLE -- Data link escape +# Byobu's escape key is ASCII Dec:94, Hex:5E, Oct:136, Char: ctrl-^ -- ctrl-caret # which is bound to F12 -escape \020\020 +escape ^^^^ # F-keys seem to work well in both gnome-terminal and tty consoles bindkey -k k1 screen -t config 0 byobu-config # F1 | Configuration (along with F9) @@ -29,22 +29,22 @@ bindkey -k k1 screen -t config 0 byobu-config # F1 | Configuration (along with bindkey -k k2 screen # F2 | Create new window bindkey -k k3 eval 'prev' 'fit' # F3 | Previous Window bindkey -k k4 eval 'next' 'fit' # F4 | Next Window -register r "\020:source $HOME/.byobu/profile^M" # | Goes with F5 definition +register r "^^:source $HOME/.byobu/profile^M" # | Goes with F5 definition bindkey -k k5 eval 'process r' # F5 | Reload profile bindkey -k k6 detach # F6 | Detach from this session bindkey -k k7 copy # F7 | Enter copy/scrollback mode -register t "\020A^[OH^k^h" # | Goes with the F8 definition +register t "^^A^[OH^k^h" # | Goes with the F8 definition bindkey -k k8 process t # F8 | Re-title a window bindkey -k k9 screen -t config 0 byobu-config # F9 | Configuration # F10 | 'toolbar' in gnome-terminal # F11 | 'fullscreen' in gnome-terminal -register x "\020" # | Goes with the F12 definition +register x "^^" # | Goes with the F12 definition bindkey -k F2 process x # F12 | Screen's escape key bind $ screen -t status 0 byobu-status-detail # F12 $ | show detailed status bind @ screen -t config 0 byobu-config # F12 @ | Configuration bind R process r # F12 R | Reload profile -register s "\020[g G$>^h" # Goes with \020~ definition -bind ~ eval 'process s' 'exec sed -i -e "/./,/^$/!d" /var/run/screen/S-$USER/printscreen' 'screen -t PRINTSCREEN view /var/run/screen/S-$USER/printscreen' # F12 ~ | write the buffer to file, open in a new window +register s "[g G$>^h" # Goes with ^^ definition +bind ~ eval 'process x' 'process s' 'exec sed -i -e "/./,/^$/!d" /var/run/screen/S-$USER/printscreen' 'screen -t PRINTSCREEN view /var/run/screen/S-$USER/printscreen' # F12 ~ | write the buffer to file, open in a new window # Hotkeys for splits (gnome-terminal) bindkey "^[O1;2Q" eval 'split' 'focus down' 'next' 'focus up' # shift-F2 | horizontal split @@ -75,7 +75,7 @@ bindkey "^[[15;5~" eval 'process r' 'stuff ". $BYOBU_PREFIX/bin/byobu-reconnect- bindkey "^[[17;2~" eval 'exec touch /var/run/screen/S-$USER/byobu.no-logout' 'detach' # ctrl-F6 | detach, but don't logout # toggle f-key keybindings off -register d "\020:source $BYOBU_PREFIX/share/byobu/keybindings/screen-escape-keys^M" +register d "^^:source $BYOBU_PREFIX/share/byobu/keybindings/screen-escape-keys^M" bind ! eval 'process d' 'backtick 111 9999999 9999999 byobu-status menu --disable-f-keys' # F12 ! | toggle on/off f-keys bindkey "^A" screen -t ctrl-a byobu-ctrl-a diff --git a/usr/share/byobu/profiles/common b/usr/share/byobu/profiles/common index 1583d64a..ab14209d 100644 --- a/usr/share/byobu/profiles/common +++ b/usr/share/byobu/profiles/common @@ -97,7 +97,7 @@ defbce "on" defscrollback 10000 # Set per-user screen-exchange -bufferfile /var/run/screen/S-$USER/byobu-exchange +bufferfile /var/run/screen/S-$USER/printscreen compacthist on # Monitor windows