diff --git a/debian/changelog b/debian/changelog index fd97e566..b4abee94 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,14 @@ byobu (5.38) unreleased; urgency=low * usr/share/man/man1/byobu.1: LP: #1121414 - document PuTTY UTF-8 configuration + thanks to Chris Holmes + * usr/bin/byobu-keybindings, usr/bin/Makefile.am, + usr/share/man/man1/byobu-keybindings.1, + usr/share/man/man1/Makefile.am: LP: #1118755 + - added a new executable and manpage: byobu-keybindings + - this is a command line utility for toggling Byobu's keybindings + on an off + - useful when Shift-F12 is not usable (Linux console tty), and + when ctrl-a-! is not usable (tmux) [ Reinhard Tartler ] * usr/bin/byobu-reconnect-sockets, usr/lib/byobu/include/shutil: LP: #1162432 diff --git a/usr/bin/Makefile.am b/usr/bin/Makefile.am index 107ef7a7..287d3736 100644 --- a/usr/bin/Makefile.am +++ b/usr/bin/Makefile.am @@ -1,4 +1,4 @@ -bin_SCRIPTS = byobu byobu-config byobu-ctrl-a byobu-disable byobu-enable byobu-export byobu-janitor byobu-launch byobu-launcher byobu-launcher-install byobu-launcher-uninstall byobu-layout byobu-quiet byobu-reconnect-sockets byobu-select-backend byobu-select-profile byobu-select-session byobu-silent byobu-status byobu-status-detail byobu-shell +bin_SCRIPTS = byobu byobu-config byobu-ctrl-a byobu-disable byobu-enable byobu-export byobu-janitor byobu-keybindings byobu-launch byobu-launcher byobu-launcher-install byobu-launcher-uninstall byobu-layout byobu-quiet byobu-reconnect-sockets byobu-select-backend byobu-select-profile byobu-select-session byobu-silent byobu-status byobu-status-detail byobu-shell install-exec-hook: cd $(DESTDIR)$(bindir) && rm -f byobu-screen && $(LN_S) byobu byobu-screen diff --git a/usr/bin/byobu-keybindings b/usr/bin/byobu-keybindings new file mode 100755 index 00000000..bea2b9ff --- /dev/null +++ b/usr/bin/byobu-keybindings @@ -0,0 +1,47 @@ +#!/bin/sh +# +# byobu-keybindings - toggle on/off the Byobu f-key shortcuts +# Copyright (C) 2013 Dustin Kirkland +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +case "$BYOBU_BACKEND" in + "tmux") + enabled=$(tmux list-keys | grep "f-keys.tmux.disable$") + if [ -n "$enabled" ]; then + tmux source "$BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux.disable" + echo "Byobu keybindings: [OFF]" + else + tmux source "$BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux" + echo "Byobu keybindings: [ON]" + fi + + ;; + "screen") + if [ -n "$STY" ]; then + flag="$BYOBU_RUN_DIR/.${STY}__f-keys_disabled" + if [ -e "$flag" ]; then + screen -X -S $STY at "*" eval 'process x' 'process e' + rm -f "$flag" + echo "Byobu keybindings: [ON]" + else + screen -X -S $STY at "*" eval 'process x' 'process d' + touch "$flag" + echo "Byobu keybindings: [OFF]" + fi + fi + ;; +esac diff --git a/usr/share/man/man1/Makefile.am b/usr/share/man/man1/Makefile.am index e435f8e6..cf1fc0fe 100644 --- a/usr/share/man/man1/Makefile.am +++ b/usr/share/man/man1/Makefile.am @@ -1 +1 @@ -man_MANS = byobu.1 byobu-config.1 byobu-ctrl-a.1 byobu-disable.1 byobu-enable.1 byobu-export.1 byobu-janitor.1 byobu-launch.1 byobu-launcher.1 byobu-launcher-install.1 byobu-launcher-uninstall.1 byobu-layout.1 byobu-quiet.1 byobu-reconnect-sockets.1 byobu-screen.1 byobu-select-backend.1 byobu-select-profile.1 byobu-select-session.1 byobu-shell.1 byobu-silent.1 byobu-status.1 byobu-status-detail.1 byobu-tmux.1 +man_MANS = byobu.1 byobu-config.1 byobu-ctrl-a.1 byobu-disable.1 byobu-enable.1 byobu-export.1 byobu-janitor.1 byobu-keybindings.1 byobu-launch.1 byobu-launcher.1 byobu-launcher-install.1 byobu-launcher-uninstall.1 byobu-layout.1 byobu-quiet.1 byobu-reconnect-sockets.1 byobu-screen.1 byobu-select-backend.1 byobu-select-profile.1 byobu-select-session.1 byobu-shell.1 byobu-silent.1 byobu-status.1 byobu-status-detail.1 byobu-tmux.1 diff --git a/usr/share/man/man1/byobu-keybindings.1 b/usr/share/man/man1/byobu-keybindings.1 new file mode 100644 index 00000000..f9c94e0b --- /dev/null +++ b/usr/share/man/man1/byobu-keybindings.1 @@ -0,0 +1,26 @@ +.TH byobu-keybindings 1 "7 May 2013" byobu "byobu" +.SH NAME +byobu-keybindings \- toggle on/off Byobu's keybindings + +.SH SYNOPSIS +\fBbyobu-keybindings\fP + +.SH DESCRIPTION +\fBbyobu-keybindings\fP toggles on and off Byobu's keybindings in the current \fBtmux\fP(1) or \fBscreen\fP(1) session. It will only operate against the current session. + +This executable is provided as an alternative to pressing -F12, and is useful in environments where -F12 does not work (e.g., on the Linux console TTY). + +Some Byobu users toggle these keybindings when they interfere with other programs using the same keybindings (e.g., \fBmc\fP(1)). + +.SH SEE ALSO +.PD 0 +.TP +\fBscreen\fP(1), \fBtmux\fP(1), \fBbyobu\fP(1), \fBmc\fP(1) +.TP +\fBhttp://byobu.co\fP +.PD + +.SH AUTHOR +This manpage and utility were written by Dustin Kirkland for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation. + +The complete text of the GNU General Public License can be found in \fI/usr/share/common-licenses/GPL\fP on Debian/Ubuntu systems, or in \fI/usr/share/doc/fedora-release-*/GPL\fP on Fedora systems, or on the web at \fIhttp://www.gnu.org/licenses/gpl.txt\fP.