* usr/lib/byobu/include/Makefile.am, usr/lib/byobu/include/tmux-send-

command-to-all-panes, usr/lib/byobu/include/tmux-send-command-to-
  all-windows, usr/share/byobu/keybindings/f-keys.tmux,
  usr/share/byobu/keybindings/f-keys.tmux.disable,
  usr/share/doc/byobu/help.tmux.txt:
  - add two new keybindings for byobu-tmux, Shift-F9 and Ctrl-F9
  - these will prompt you for a command, and then run that command
    in all splits or windows (respectively)
This commit is contained in:
Dustin Kirkland 2014-02-17 15:05:04 -06:00
commit f34b6ecd88
7 changed files with 61 additions and 2 deletions

9
debian/changelog vendored
View file

@ -1,6 +1,13 @@
byobu (5.73) unreleased; urgency=low
* UNRELEASED
* usr/lib/byobu/include/Makefile.am, usr/lib/byobu/include/tmux-send-
command-to-all-panes, usr/lib/byobu/include/tmux-send-command-to-
all-windows, usr/share/byobu/keybindings/f-keys.tmux,
usr/share/byobu/keybindings/f-keys.tmux.disable,
usr/share/doc/byobu/help.tmux.txt:
- add two new keybindings for byobu-tmux, Shift-F9 and Ctrl-F9
- these will prompt you for a command, and then run that command
in all splits or windows (respectively)
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 12 Feb 2014 14:30:40 -0600

View file

@ -1,2 +1,2 @@
inclibdirdir = $(prefix)/lib/@PACKAGE@/include
inclibdir_SCRIPTS = common config.py constants cycle-status dirs icons mondrian notify_osd shutil ec2instancespricing.py select-session.py tmux-detach-all-but-current-client toggle-utf8
inclibdir_SCRIPTS = common config.py constants cycle-status dirs icons mondrian notify_osd shutil ec2instancespricing.py select-session.py tmux-detach-all-but-current-client tmux-send-command-to-all-panes tmux-send-command-to-all-windows toggle-utf8

View file

@ -0,0 +1,23 @@
#!/bin/sh
#
# tmux-send-command-to-all-panes
# Copyright (C) 2014 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/>.
for w in $(tmux list-panes | $BYOBU_SED -e "s/:.*//"); do
tmux send-keys -t $w "$@"
tmux send-keys -t $w Enter
done

View file

@ -0,0 +1,23 @@
#!/bin/sh
#
# tmux-send-command-to-all-windows
# Copyright (C) 2014 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/>.
for w in $(tmux list-windows | $BYOBU_SED -e "s/:.*//"); do
tmux send-keys -t :$w "$@"
tmux send-keys -t :$w Enter
done

View file

@ -71,6 +71,8 @@ bind-key -n S-F8 next-layout
bind-key -n M-S-F8 new-window -k "byobu-layout restore; clear; $SHELL"
bind-key -n C-S-F8 command-prompt -p "Save byobu layout as:" "run-shell \"byobu-layout save '%%'\""
bind-key -n F9 new-window -k -n config byobu-config
bind-key -n S-F9 command-prompt -p "Send command to all panes:" "run-shell \"$BYOBU_PREFIX/lib/byobu/include/tmux-send-command-to-all-panes '%%'\""
bind-key -n C-F9 command-prompt -p "Send command to all windows:" "run-shell \"$BYOBU_PREFIX/lib/byobu/include/tmux-send-command-to-all-windows '%%'\""
bind-key -n M-F11 break-pane
bind-key -n C-F11 join-pane -h -s :. -t :-1
bind-key -n S-F11 join-pane -v -s :. -t :-1

View file

@ -72,6 +72,8 @@ unbind-key -n C-S-F8
unbind-key -n M-S-F8
unbind-key -n S-F8
unbind-key -n F9
unbind-key -n S-F9
unbind-key -n C-F9
unbind-key -n M-F11
unbind-key -n C-F11
unbind-key -n S-F11

View file

@ -34,6 +34,8 @@ and some convenient keybindings:
Alt-Shift-F8 Restore a split-pane layout
Ctrl-Shift-F8 Save the current split-pane layout
F9 Launch byobu-config window
Ctrl-F9 Enter command and run in all windows
Shift-F9 Enter command and run in all splits
F10 * Used by X11 *
F11 * Used by X11 *
Alt-F11 Expand split to a full window