diff --git a/debian/changelog b/debian/changelog index a43b9cef..d1befce4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 12 Feb 2014 14:30:40 -0600 diff --git a/usr/lib/byobu/include/Makefile.am b/usr/lib/byobu/include/Makefile.am index 51b9c607..87e9b8a5 100644 --- a/usr/lib/byobu/include/Makefile.am +++ b/usr/lib/byobu/include/Makefile.am @@ -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 diff --git a/usr/lib/byobu/include/tmux-send-command-to-all-panes b/usr/lib/byobu/include/tmux-send-command-to-all-panes new file mode 100755 index 00000000..1e2d8f90 --- /dev/null +++ b/usr/lib/byobu/include/tmux-send-command-to-all-panes @@ -0,0 +1,23 @@ +#!/bin/sh +# +# tmux-send-command-to-all-panes +# Copyright (C) 2014 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 . + +for w in $(tmux list-panes | $BYOBU_SED -e "s/:.*//"); do + tmux send-keys -t $w "$@" + tmux send-keys -t $w Enter +done diff --git a/usr/lib/byobu/include/tmux-send-command-to-all-windows b/usr/lib/byobu/include/tmux-send-command-to-all-windows new file mode 100755 index 00000000..35f697ab --- /dev/null +++ b/usr/lib/byobu/include/tmux-send-command-to-all-windows @@ -0,0 +1,23 @@ +#!/bin/sh +# +# tmux-send-command-to-all-windows +# Copyright (C) 2014 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 . + +for w in $(tmux list-windows | $BYOBU_SED -e "s/:.*//"); do + tmux send-keys -t :$w "$@" + tmux send-keys -t :$w Enter +done diff --git a/usr/share/byobu/keybindings/f-keys.tmux b/usr/share/byobu/keybindings/f-keys.tmux index 51088353..3385b758 100644 --- a/usr/share/byobu/keybindings/f-keys.tmux +++ b/usr/share/byobu/keybindings/f-keys.tmux @@ -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 diff --git a/usr/share/byobu/keybindings/f-keys.tmux.disable b/usr/share/byobu/keybindings/f-keys.tmux.disable index e886adcc..88adb863 100644 --- a/usr/share/byobu/keybindings/f-keys.tmux.disable +++ b/usr/share/byobu/keybindings/f-keys.tmux.disable @@ -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 diff --git a/usr/share/doc/byobu/help.tmux.txt b/usr/share/doc/byobu/help.tmux.txt index 9cf62682..147375d1 100644 --- a/usr/share/doc/byobu/help.tmux.txt +++ b/usr/share/doc/byobu/help.tmux.txt @@ -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