- use ctrl-^ as the default escape character

* usr/share/byobu/profiles/common: fix printscreen screen exchange file
This commit is contained in:
Dustin Kirkland 2011-05-10 14:34:49 +02:00
commit c72240eef4
5 changed files with 13 additions and 12 deletions

3
debian/changelog vendored
View file

@ -4,7 +4,7 @@ byobu (3.35c) unreleased; urgency=low
usr/share/byobu/keybindings/screen-escape-keys, usr/share/byobu/keybindings/screen-escape-keys,
usr/share/doc/byobu/help.txt, usr/bin/Makefile.am, usr/share/doc/byobu/help.txt, usr/bin/Makefile.am,
usr/bin/byobu-ctrl-a: LP: #776743 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 - bind F12 to printing the escape character
- adjust everything accordingly - adjust everything accordingly
* usr/share/byobu/keybindings/f-keys, * 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 variable, that ssh clients could export and globally disable launching
byobu on ssh logins (note that this will require whitelisting that byobu on ssh logins (note that this will require whitelisting that
variable on the ssh client and server) variable on the ssh client and server)
* usr/share/byobu/profiles/common: fix printscreen screen exchange file
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 03 May 2011 12:11:10 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 03 May 2011 12:11:10 -0500

View file

@ -484,7 +484,7 @@ def setesckey(key):
out = commands.getoutput(SED+" -i -e 's/^register.*$//' "+path) out = commands.getoutput(SED+" -i -e 's/^register.*$//' "+path)
out = commands.getoutput("grep -h ^register "+SHARE+"/keybindings/*keys") out = commands.getoutput("grep -h ^register "+SHARE+"/keybindings/*keys")
appendtofile(path, out+"\n") 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) out = commands.getoutput(SED+" -i -e '/^$/d' "+path)
def chgesc(screen, size): def chgesc(screen, size):

View file

@ -46,7 +46,7 @@ while true; do
;; ;;
2) 2)
sed -i -e "/^register a /d" -e "/^bindkey \"^A\"/d" "$keybindings" 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 'bindkey "^A" process a' >> "$keybindings"
echo "INFO: ctrl-a will now operate in screen mode" echo "INFO: ctrl-a will now operate in screen mode"
break break

View file

@ -19,9 +19,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
############################################################################### ###############################################################################
# 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 # which is bound to F12
escape \020\020 escape ^^^^
# F-keys seem to work well in both gnome-terminal and tty consoles # 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) 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 k2 screen # F2 | Create new window
bindkey -k k3 eval 'prev' 'fit' # F3 | Previous Window bindkey -k k3 eval 'prev' 'fit' # F3 | Previous Window
bindkey -k k4 eval 'next' 'fit' # F4 | Next 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 k5 eval 'process r' # F5 | Reload profile
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
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 k8 process t # F8 | Re-title a window
bindkey -k k9 screen -t config 0 byobu-config # F9 | Configuration bindkey -k k9 screen -t config 0 byobu-config # F9 | Configuration
# F10 | 'toolbar' in gnome-terminal # F10 | 'toolbar' in gnome-terminal
# F11 | 'fullscreen' 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 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 status 0 byobu-status-detail # F12 $ | show detailed status
bind @ screen -t config 0 byobu-config # F12 @ | Configuration bind @ screen -t config 0 byobu-config # F12 @ | Configuration
bind R process r # F12 R | Reload profile bind R process r # F12 R | Reload profile
register s "\020[g G$>^h" # Goes with \020~ definition register s "[g G$>^h" # Goes with ^^ 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 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) # Hotkeys for splits (gnome-terminal)
bindkey "^[O1;2Q" eval 'split' 'focus down' 'next' 'focus up' # shift-F2 | horizontal split 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 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 # 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 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 bindkey "^A" screen -t ctrl-a byobu-ctrl-a

View file

@ -97,7 +97,7 @@ defbce "on"
defscrollback 10000 defscrollback 10000
# Set per-user screen-exchange # Set per-user screen-exchange
bufferfile /var/run/screen/S-$USER/byobu-exchange bufferfile /var/run/screen/S-$USER/printscreen
compacthist on compacthist on
# Monitor windows # Monitor windows