* 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)
This commit is contained in:
Dustin Kirkland 2013-05-07 16:40:36 -05:00
commit 6d69a7ba0a
5 changed files with 83 additions and 2 deletions

8
debian/changelog vendored
View file

@ -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

View file

@ -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

47
usr/bin/byobu-keybindings Executable file
View file

@ -0,0 +1,47 @@
#!/bin/sh
#
# byobu-keybindings - toggle on/off the Byobu f-key shortcuts
# Copyright (C) 2013 Dustin Kirkland
#
# Authors: Dustin Kirkland <kirkland@byobu.co>
#
# 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 <http://www.gnu.org/licenses/>.
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

View file

@ -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

View file

@ -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 <Shift>-F12, and is useful in environments where <Shift>-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 <kirkland@byobu.co> 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.