* usr/lib/byobu/include/constants, usr/share/byobu/keybindings/f-

keys.screen, usr/share/byobu/keybindings/f-keys.tmux:
  - create a $BYOBU_EDITOR variable, using "sensible-editor" if found
    (it will be on Debian/Ubuntu systems), or $EDITOR if not, and falling
    back to "vim" in the case where none are found
  - use $BYOBU_EDITOR with Shift-F7 to open the printscreen buffer in
    a new window;  this fixes a bug on some distros where $EDITOR might
    be undefined
This commit is contained in:
Dustin Kirkland 2018-04-11 10:16:45 -05:00
commit 76560f004d
4 changed files with 14 additions and 4 deletions

9
debian/changelog vendored
View file

@ -1,6 +1,13 @@
byobu (5.126) unreleased; urgency=medium
* UNRELEASED
* usr/lib/byobu/include/constants, usr/share/byobu/keybindings/f-
keys.screen, usr/share/byobu/keybindings/f-keys.tmux:
- create a $BYOBU_EDITOR variable, using "sensible-editor" if found
(it will be on Debian/Ubuntu systems), or $EDITOR if not, and falling
back to "vim" in the case where none are found
- use $BYOBU_EDITOR with Shift-F7 to open the printscreen buffer in
a new window; this fixes a bug on some distros where $EDITOR might
be undefined
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 16 Mar 2018 10:09:57 -0700

View file

@ -47,6 +47,9 @@ esac
eval $BYOBU_TEST gsed >/dev/null 2>&1 && export BYOBU_SED="gsed" || export BYOBU_SED="sed"
eval $BYOBU_TEST greadlink >/dev/null 2>&1 && export BYOBU_READLINK="greadlink" || export BYOBU_READLINK="readlink"
eval $BYOBU_TEST sensible-pager >/dev/null 2>&1 && export BYOBU_PAGER="sensible-pager" || export BYOBU_PAGER="less"
eval $BYOBU_TEST sensible-editor >/dev/null 2>&1 && export BYOBU_EDITOR="sensible-editor" || export BYOBU_EDITOR="$EDITOR"
eval $BYOBU_TEST "$BYOBU_EDITOR" >/dev/null 2>&1 || export BYOBU_EDITOR="vim"
# Check sed's follow-symlinks feature
$BYOBU_SED --follow-symlinks "s///" /dev/null 2>/dev/null && BYOBU_SED_INLINE="$BYOBU_SED -i --follow-symlinks" || BYOBU_SED_INLINE="$BYOBU_SED -i"

View file

@ -74,7 +74,7 @@ bindkey "^[[19;5~" eval 'process x' 'process u' # Ctrl-F8 | Re-title a session
# No ctrl-shift-F8 (save layout) in Screen
bindkey -k k9 $BYOBU_BACKEND -t config 0 byobu-config # F9 | Configuration
register s "[g G$>^h" # Goes with Shift-F7 and F12 ~ definition
bindkey "^[[18;2~" eval 'process x' 'process s' 'exec $BYOBU_SED_INLINE -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN $EDITOR $BYOBU_RUN_DIR/printscreen' # Shift-F7 | write the buffer to file, open in a new window
bindkey "^[[18;2~" eval 'process x' 'process s' 'exec $BYOBU_SED_INLINE -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN $BYOBU_EDITOR $BYOBU_RUN_DIR/printscreen' # Shift-F7 | write the buffer to file, open in a new window
# F10 | 'toolbar' in gnome-terminal
# F11 | 'Full Screen' in gnome-terminal
# No alt-F11 (break pane) in Screen
@ -84,7 +84,7 @@ bindkey -k F2 process x # F12 | Byobu's escape key
bind $ $BYOBU_BACKEND -t status 0 byobu-status-detail # F12 $ | show detailed status
bind @ $BYOBU_BACKEND -t config 0 byobu-config # F12 @ | Configuration
bind R process r # F12 R | Reload profile
bind ~ eval 'process x' 'process s' 'exec $BYOBU_SED_INLINE -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN $EDITOR $BYOBU_RUN_DIR/printscreen' # F12 ~ | write the buffer to file, open in a new window
bind ~ eval 'process x' 'process s' 'exec $BYOBU_SED_INLINE -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN $BYOBU_EDITOR $BYOBU_RUN_DIR/printscreen' # F12 ~ | write the buffer to file, open in a new window
register d ":source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.screen.disable^M"
bind ! eval 'process x' 'process d' 'backtick 111 9999999 9999999 byobu-status menu --disable-f-keys' # F12 ! | toggle on/off f-keys

View file

@ -62,7 +62,7 @@ bind-key -n M-F6 run-shell '$BYOBU_PREFIX/lib/byobu/include/tmux-detach-all-but-
bind-key -n S-F6 run-shell 'exec touch $BYOBU_RUN_DIR/no-logout' \; detach
bind-key -n C-F6 kill-pane
bind-key -n F7 copy-mode
bind-key -n S-F7 capture-pane -S -32768 \; save-buffer "$BYOBU_RUN_DIR/printscreen" \; delete-buffer \; new-window -n "PRINTSCREEN" "$EDITOR $BYOBU_RUN_DIR/printscreen"
bind-key -n S-F7 capture-pane -S -32768 \; save-buffer "$BYOBU_RUN_DIR/printscreen" \; delete-buffer \; new-window -n "PRINTSCREEN" "$BYOBU_EDITOR $BYOBU_RUN_DIR/printscreen"
bind-key -n M-NPage copy-mode \; send-keys NPage
bind-key -n M-PPage copy-mode \; send-keys PPage
bind-key -n F8 command-prompt -p "(rename-window) " "rename-window '%%'"