From 6cd6408c978bdab2f705f64a1350c3f1992f4088 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 20 Apr 2010 16:59:04 -0500 Subject: [PATCH] * bin/byobu-janitor, share/byobu/keybindings/f-keys, share/byobu/profiles/common, share/man/man1/byobu.1: add a keybinding, ctrl-a ~ to write the current window's buffer to a file, LP: #565399 * debian/control, debian/screen-profiles.postinst: remove final remnants of screen-profiles --- debian/changelog | 5 +++++ usr/bin/byobu-janitor | 5 +++++ usr/share/byobu/keybindings/f-keys | 1 + usr/share/byobu/profiles/common | 4 ++++ usr/share/man/man1/byobu.1 | 2 ++ 5 files changed, 17 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0d8945d4..ee9918d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,11 @@ byobu (2.69) unreleased; urgency=low po/fr.po, po/hu.po, po/is.po, po/it.po, po/la.po, po/lt.po, po/nl.po, po/pt.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po, po/uk.po: - translations merged, LP: #567309 + * bin/byobu-janitor, share/byobu/keybindings/f-keys, + share/byobu/profiles/common, share/man/man1/byobu.1: add a keybinding, + ctrl-a ~ to write the current window's buffer to a file, LP: #565399 + * debian/control, debian/screen-profiles.postinst: remove final remnants + of screen-profiles -- Dustin Kirkland Thu, 15 Apr 2010 12:12:39 -0500 diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index 6841c190..ffedfb7c 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -40,6 +40,11 @@ if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent" fi +# Create byobu-exchange buffer file, with secure permissions, if it doesn't exist +if [ -w "$RUN" ] && [ ! -e "$RUN/$PKG-exchange" ]; then + install -m 600 /dev/null "$RUN/$PKG-exchange" +fi + # Affects: users who launched using sudo, such that their config dir # is not writable by them if [ -d "$HOME/.$PKG" ] && [ ! -w "$HOME/.$PKG" ]; then diff --git a/usr/share/byobu/keybindings/f-keys b/usr/share/byobu/keybindings/f-keys index f68fa057..bca9d2d3 100644 --- a/usr/share/byobu/keybindings/f-keys +++ b/usr/share/byobu/keybindings/f-keys @@ -37,6 +37,7 @@ bindkey -k F2 lockscreen # F12 | Lock this terminal bind $ screen -t status 0 byobu-status-detail # ctrl-a $ | show detailed status bind @ screen -t config 0 byobu-config # ctrl-a @ | Configuration bind R process r # ctrl-a R | Reload profile +bind ~ eval writebuf 'exec sed -i "/./,/^$/!d" /var/run/screen/S-$USER/byobu-exchange' # ctrl-a ~ | write the buffer to file # toggle f-key keybindings off register d "^a:source /usr/share/byobu/keybindings/screen-escape-keys^M" diff --git a/usr/share/byobu/profiles/common b/usr/share/byobu/profiles/common index e68d0517..f4fd9579 100644 --- a/usr/share/byobu/profiles/common +++ b/usr/share/byobu/profiles/common @@ -86,6 +86,10 @@ defbce "on" # Log 10000 lines defscrollback 10000 +# Set per-user screen-exchange +bufferfile /var/run/screen/S-$USER/byobu-exchange +compacthist on + # Monitor windows defmonitor on activity "" diff --git a/usr/share/man/man1/byobu.1 b/usr/share/man/man1/byobu.1 index 349e3e96..96f52070 100644 --- a/usr/share/man/man1/byobu.1 +++ b/usr/share/man/man1/byobu.1 @@ -106,6 +106,8 @@ byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or withi \fBCtrl-a k\fP \- Kill the current window +\fBCtrl-a ~\fP \- Write the current window's scrollback buffer to \fI/var/run/screen/S-$USER/byobu-exchange\fP + .SH "BUGS" PuTTY users have reported that the F2, F3, and F4 shortcut keys are not working properly. PuTTY sends the same escape sequences as the linux console for F1-F4 by default. You can fix this problem in the PuTTY config, Terminal -> Keyboard -> Function keys: Xterm R6. See: \fIhttp://www.mail-archive.com/screen-users@gnu.org/msg01525.html\fP