mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-14 10:46:58 -07:00
* experimental/byobu-classroom, usr/bin/byobu-ctrl-a.in, usr/bin/byobu-
disable-prompt.in, usr/bin/byobu-janitor.in, usr/bin/byobu-launcher- uninstall.in, usr/bin/byobu-quiet.in, usr/bin/byobu-silent.in, usr/bin/byobu-status.in, usr/lib/byobu/include/constants, usr/share/byobu/keybindings/f-keys.screen: LP: #1068580 - create BYOBU_SED_INLINE variable, to handle inline sed's, using --follow-symlinks when possible (not always available)
This commit is contained in:
parent
0c2557a2d9
commit
2ae1b202e4
11 changed files with 26 additions and 19 deletions
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -11,6 +11,13 @@ byobu (5.95) unreleased; urgency=medium
|
|||
- find the motd
|
||||
* usr/share/byobu/keybindings/f-keys.tmux.disable: LP: #1453037
|
||||
- ensure that we source user's keybindings
|
||||
* experimental/byobu-classroom, usr/bin/byobu-ctrl-a.in, usr/bin/byobu-
|
||||
disable-prompt.in, usr/bin/byobu-janitor.in, usr/bin/byobu-launcher-
|
||||
uninstall.in, usr/bin/byobu-quiet.in, usr/bin/byobu-silent.in,
|
||||
usr/bin/byobu-status.in, usr/lib/byobu/include/constants,
|
||||
usr/share/byobu/keybindings/f-keys.screen: LP: #1068580
|
||||
- create BYOBU_SED_INLINE variable, to handle inline sed's, using
|
||||
--follow-symlinks when possible (not always available)
|
||||
|
||||
[ Fortunato Ventre ]
|
||||
* usr/lib/byobu/include/constants:
|
||||
|
|
|
@ -125,7 +125,7 @@ while [ $(grep -c "#byobu-classrom" /etc/ssh/sshd_config) != "4" ]; do
|
|||
c=$(head -n1)
|
||||
case "$c" in
|
||||
y|Y)
|
||||
$BYOBU_SED -i -e '/#byobu-classroom/d' /etc/ssh/sshd_config || true
|
||||
$BYOBU_SED_INLINE -e '/#byobu-classroom/d' /etc/ssh/sshd_config || true
|
||||
echo "
|
||||
PasswordAuthentication yes #byobu-classroom
|
||||
AllowTcpForwarding no #byobu-classroom
|
||||
|
|
|
@ -98,12 +98,12 @@ case "$bind_to" in
|
|||
emacs)
|
||||
case "$BYOBU_BACKEND" in
|
||||
screen)
|
||||
$BYOBU_SED -i -e "/^register x /d" -e "/^bindkey /d" -e "/^escape /d" "$keybindings"
|
||||
$BYOBU_SED_INLINE -e "/^register x /d" -e "/^bindkey /d" -e "/^escape /d" "$keybindings"
|
||||
echo "bindkey \"^${KEY}\"" >> "$keybindings"
|
||||
$BYOBU_BACKEND -X at 0 source "$BYOBU_CONFIG_DIR/profile"
|
||||
;;
|
||||
tmux)
|
||||
$BYOBU_SED -i -e "/^set -g prefix/d" -e "/ send-prefix/d" -e "/^unbind-key -n C-${key}/d" "$keybindings"
|
||||
$BYOBU_SED_INLINE -e "/^set -g prefix/d" -e "/ send-prefix/d" -e "/^unbind-key -n C-${key}/d" "$keybindings"
|
||||
echo "set -g prefix F12" >> "$keybindings"
|
||||
echo "unbind-key -n C-${key}" >> "$keybindings"
|
||||
$BYOBU_BACKEND source "$BYOBU_PREFIX/share/byobu/profiles/tmuxrc"
|
||||
|
@ -114,14 +114,14 @@ case "$bind_to" in
|
|||
screen)
|
||||
case "$BYOBU_BACKEND" in
|
||||
screen)
|
||||
$BYOBU_SED -i -e "/^register x /d" -e "/^bindkey \"^\"/d" -e "/^escape /d" "$keybindings"
|
||||
$BYOBU_SED_INLINE -e "/^register x /d" -e "/^bindkey \"^\"/d" -e "/^escape /d" "$keybindings"
|
||||
echo "bindkey \"^${KEY}\"" >> "$keybindings"
|
||||
echo "escape \"^${KEY}${key}\"" >> "$keybindings"
|
||||
echo "register x \"^${KEY}\"" >> "$keybindings"
|
||||
$BYOBU_BACKEND -X at 0 source "$BYOBU_CONFIG_DIR/profile"
|
||||
;;
|
||||
tmux)
|
||||
$BYOBU_SED -i -e "/^set -g prefix/d" -e "/ send-prefix/d" -e "/^unbind-key -n C-${key}/d" "$keybindings"
|
||||
$BYOBU_SED_INLINE -e "/^set -g prefix/d" -e "/ send-prefix/d" -e "/^unbind-key -n C-${key}/d" "$keybindings"
|
||||
echo "unbind-key -n C-${key}" >> "$keybindings"
|
||||
if $BYOBU_BACKEND -V | grep " 1.5"; then
|
||||
# tmux 1.5 supports a list of prefixes
|
||||
|
|
|
@ -22,7 +22,7 @@ PKG="byobu"
|
|||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
|
||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||
|
||||
$BYOBU_SED -i -e "/#byobu-prompt#$/d" "$HOME/.bashrc"
|
||||
$BYOBU_SED_INLINE -e "/#byobu-prompt#$/d" "$HOME/.bashrc"
|
||||
|
||||
if [ "$1" != "--no-reload" ]; then
|
||||
if [ -n "$TMUX" ] && [ "$SHELL" = "/bin/bash" ]; then
|
||||
|
|
|
@ -84,7 +84,7 @@ for f in status statusrc; do
|
|||
cp -f "$BYOBU_PREFIX/share/$PKG/status/$f" "$BYOBU_CONFIG_DIR/$f"
|
||||
# Enable ec2_cost, if we're in ec2 and seeding a new setup
|
||||
if metadata_available; then
|
||||
$BYOBU_SED -i -e "s/#ec2_cost/ec2_cost/g" "$($BYOBU_READLINK -f $BYOBU_CONFIG_DIR/$f)"
|
||||
$BYOBU_SED_INLINE -e "s/#ec2_cost/ec2_cost/g" "$($BYOBU_READLINK -f $BYOBU_CONFIG_DIR/$f)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -98,7 +98,7 @@ fi
|
|||
# Affects: Upgrades from <= byobu-2.78 which might have "motd+shell"
|
||||
# in their window list; update this to just "shell"
|
||||
if grep -qs "motd+shell" "$BYOBU_CONFIG_DIR/windows"; then
|
||||
$BYOBU_SED -i -e "s/motd+shell/shell/g" "$($BYOBU_READLINK -f $BYOBU_CONFIG_DIR/windows)" || true
|
||||
$BYOBU_SED_INLINE -e "s/motd+shell/shell/g" "$($BYOBU_READLINK -f $BYOBU_CONFIG_DIR/windows)" || true
|
||||
fi
|
||||
|
||||
# Affects: Upgrades from <= byobu 4.3, remove ec2_rates
|
||||
|
@ -106,7 +106,7 @@ rm -f "$BYOBU_CONFIG_DIR/ec2_rates"
|
|||
|
||||
# Affects: Upgrades from <= byobu 4.4, update "shell" -> "byobu-shell"
|
||||
if grep -qs " shell$" "$BYOBU_CONFIG_DIR/windows"; then
|
||||
$BYOBU_SED -i -e "s/ shell$/ $PKG-shell/g" "$($BYOBU_READLINK -f $BYOBU_CONFIG_DIR/windows)" || true
|
||||
$BYOBU_SED_INLINE -e "s/ shell$/ $PKG-shell/g" "$($BYOBU_READLINK -f $BYOBU_CONFIG_DIR/windows)" || true
|
||||
fi
|
||||
|
||||
# Affects: Upgrades from <= byobu 4.22
|
||||
|
|
|
@ -27,7 +27,7 @@ remove_launcher() {
|
|||
dest=$1
|
||||
if [ -w "$dest" ]; then
|
||||
# keep any comments, and remove lines invoking byobu:
|
||||
$BYOBU_SED -i -e '/^\s*#/n' -e "/\b$PKG-launch/d" -e "/\bscreen-launch/d" "$dest"
|
||||
$BYOBU_SED_INLINE -e '/^\s*#/n' -e "/\b$PKG-launch/d" -e "/\bscreen-launch/d" "$dest"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ PKG="byobu"
|
|||
FLAG="$BYOBU_CONFIG_DIR/status.disable"
|
||||
|
||||
# Clean up environment
|
||||
$BYOBU_SED -i "/hardstatus/d" "$BYOBU_CONFIG_DIR/keybindings" || true
|
||||
$BYOBU_SED_INLINE "/hardstatus/d" "$BYOBU_CONFIG_DIR/keybindings" || true
|
||||
if [ "$1" = "--undo" ]; then
|
||||
rm -f "$FLAG"
|
||||
else
|
||||
|
|
|
@ -25,7 +25,7 @@ PKG="byobu"
|
|||
FLAG="$BYOBU_CONFIG_DIR/status.disable"
|
||||
|
||||
# Clean up environment
|
||||
$BYOBU_SED -i "/caption/d" "$BYOBU_CONFIG_DIR/keybindings" || true
|
||||
$BYOBU_SED_INLINE "/caption/d" "$BYOBU_CONFIG_DIR/keybindings" || true
|
||||
if [ "$1" = "--undo" ]; then
|
||||
rm -f "$FLAG"
|
||||
else
|
||||
|
|
|
@ -115,7 +115,7 @@ case "$1" in
|
|||
case "$i" in
|
||||
\#date)
|
||||
if [ -n "$BYOBU_DATE" ]; then
|
||||
$BYOBU_SED -i -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
$BYOBU_SED_INLINE -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
printf "%s\n" 'BYOBU_DATE=' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
touch "$BYOBU_RUN_DIR/reload-required"
|
||||
continue
|
||||
|
@ -123,7 +123,7 @@ case "$1" in
|
|||
;;
|
||||
\#time)
|
||||
if [ -n "$BYOBU_TIME" ]; then
|
||||
$BYOBU_SED -i -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
$BYOBU_SED_INLINE -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
printf "%s\n" 'BYOBU_TIME=' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
touch "$BYOBU_RUN_DIR/reload-required"
|
||||
continue
|
||||
|
@ -131,7 +131,7 @@ case "$1" in
|
|||
;;
|
||||
date)
|
||||
if [ -z "$BYOBU_DATE" ]; then
|
||||
$BYOBU_SED -i -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
$BYOBU_SED_INLINE -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
printf "%s\n" 'BYOBU_DATE="%Y-%m-%d "' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
touch "$BYOBU_RUN_DIR/reload-required"
|
||||
continue
|
||||
|
@ -139,7 +139,7 @@ case "$1" in
|
|||
;;
|
||||
time)
|
||||
if [ -z "$BYOBU_TIME" ]; then
|
||||
$BYOBU_SED -i -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
$BYOBU_SED_INLINE -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
printf "%s\n" 'BYOBU_TIME="%H:%M:%S"' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
touch "$BYOBU_RUN_DIR/reload-required"
|
||||
continue
|
||||
|
|
|
@ -49,7 +49,7 @@ $BYOBU_TEST greadlink >/dev/null 2>&1 && export BYOBU_READLINK="greadlink" || ex
|
|||
$BYOBU_TEST sensible-pager >/dev/null 2>&1 && export BYOBU_PAGER="sensible-pager" || export BYOBU_PAGER="less"
|
||||
|
||||
# Check sed's follow-symlinks feature
|
||||
$BYOBU_SED --follow-symlinks "s///" /dev/null 2>/dev/null && BYOBU_SED="$BYOBU_SED --follow-symlinks" || true
|
||||
$BYOBU_SED --follow-symlinks "s///" /dev/null 2>/dev/null && BYOBU_SED_INLINE="$BYOBU_SED -i --follow-symlinks" || BYOBU_SED_INLINE="$BYOBU_SED -i"
|
||||
|
||||
# Determine if we have ulimit support
|
||||
$BYOBU_TEST ulimit >/dev/null 2>&1 && export BYOBU_ULIMIT="ulimit" || export BYOBU_ULIMIT="false"
|
||||
|
|
|
@ -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 -i -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN view $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 view $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 -i -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN view $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 view $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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue