mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-24 07:06:19 -07:00
* usr/share/byobu/keybindings/f-keys.tmux,
usr/share/byobu/keybindings/f-keys.tmux.disable, usr/share/byobu/keybindings/Makefile.am, usr/share/byobu/profiles/tmux, usr/share/doc/byobu/help.tmux.txt: - Add Shift-F12 to toggle keybindings on/off - Split tmux keybindings to separate file to source
This commit is contained in:
parent
e955222379
commit
165d9b79a1
6 changed files with 133 additions and 40 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -23,6 +23,12 @@ byobu (4.47) unreleased; urgency=low
|
||||||
- Ctrl-F11 puts window into a vertical split in previous window
|
- Ctrl-F11 puts window into a vertical split in previous window
|
||||||
* usr/share/doc/byobu/help.tmux.txt:
|
* usr/share/doc/byobu/help.tmux.txt:
|
||||||
- fix typo
|
- fix typo
|
||||||
|
* usr/share/byobu/keybindings/f-keys.tmux,
|
||||||
|
usr/share/byobu/keybindings/f-keys.tmux.disable,
|
||||||
|
usr/share/byobu/keybindings/Makefile.am,
|
||||||
|
usr/share/byobu/profiles/tmux, usr/share/doc/byobu/help.tmux.txt:
|
||||||
|
- Add Shift-F12 to toggle keybindings on/off
|
||||||
|
- Split tmux keybindings to separate file to source
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 08 Nov 2011 19:16:15 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 08 Nov 2011 19:16:15 -0600
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
keybindingsdir = $(datadir)/@PACKAGE@/keybindings
|
keybindingsdir = $(datadir)/@PACKAGE@/keybindings
|
||||||
keybindings_DATA = common f-keys none screen-escape-keys
|
keybindings_DATA = common f-keys f-keys.tmux f-keys.tmux.disable none screen-escape-keys
|
||||||
|
|
64
usr/share/byobu/keybindings/f-keys.tmux
Normal file
64
usr/share/byobu/keybindings/f-keys.tmux
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
###############################################################################
|
||||||
|
# byobu's tmux f-key keybindings
|
||||||
|
#
|
||||||
|
# Copyright (C) 2011 Dustin Kirkland
|
||||||
|
#
|
||||||
|
# Authors: Dustin Kirkland <kirkland@ubuntu.com>
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Add F12 to the prefix list
|
||||||
|
set -g prefix ^A,F12
|
||||||
|
|
||||||
|
# Byobu's Keybindings
|
||||||
|
# Documented in: /usr/share/doc/byobu/help.tmux.txt
|
||||||
|
bind-key -n F1 new-window -k -n config byobu-config
|
||||||
|
bind-key -n S-F1 new-window -k -n help 'sensible-pager /usr/share/doc/byobu/help.tmux.txt'
|
||||||
|
bind-key -n F2 new-window
|
||||||
|
bind-key -n C-F2 display-panes \; split-window -h
|
||||||
|
bind-key -n S-F2 display-panes \; split-window -v
|
||||||
|
bind-key -n C-S-F2 new-session
|
||||||
|
bind-key -n F3 previous-window
|
||||||
|
bind-key -n F4 next-window
|
||||||
|
bind-key -n M-Left previous-window
|
||||||
|
bind-key -n M-Right next-window
|
||||||
|
bind-key -n M-Up choose-session \; send-keys Up \; send-keys Enter
|
||||||
|
bind-key -n M-Down choose-session \; send-keys Down \; send-keys Enter
|
||||||
|
bind-key -n S-F3 display-panes \; select-pane -t :.-
|
||||||
|
bind-key -n S-F4 display-panes \; select-pane -t :.+
|
||||||
|
bind-key -n S-Up display-panes \; select-pane -U
|
||||||
|
bind-key -n S-Down display-panes \; select-pane -D
|
||||||
|
bind-key -n S-Left display-panes \; select-pane -L
|
||||||
|
bind-key -n S-Right display-panes \; select-pane -R
|
||||||
|
bind-key -n C-F3 display-panes \; swap-pane -s :. -t :.- \; select-pane -t :.-
|
||||||
|
bind-key -n C-F4 display-panes \; swap-pane -s :. -t :.+ \; select-pane -t :.+
|
||||||
|
bind-key -n C-Up resize-pane -U
|
||||||
|
bind-key -n C-Down resize-pane -D
|
||||||
|
bind-key -n C-Left resize-pane -L
|
||||||
|
bind-key -n C-Right resize-pane -R
|
||||||
|
bind-key -n F5 source /usr/share/byobu/profiles/tmuxrc
|
||||||
|
bind-key -n S-F5 next-layout
|
||||||
|
bind-key -n C-F5 send-keys ". $BYOBU_PREFIX/bin/byobu-reconnect-sockets" \; send-keys Enter
|
||||||
|
bind-key -n F6 detach
|
||||||
|
bind-key -n S-F6 run-shell 'exec touch $BYOBU_RUN_DIR/no-logout' \; detach
|
||||||
|
bind-key -n C-F6 kill-pane
|
||||||
|
bind-key -n F7 copy-mode
|
||||||
|
bind-key -n M-NPage copy-mode \; send-keys NPage
|
||||||
|
bind-key -n M-PPage copy-mode \; send-keys PPage
|
||||||
|
bind-key -n F8 command-prompt -p "(rename-window)" "rename-window %%"
|
||||||
|
bind-key -n F9 new-window -k -n config byobu-config
|
||||||
|
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
|
||||||
|
bind-key -n S-F12 source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux.disable
|
60
usr/share/byobu/keybindings/f-keys.tmux.disable
Normal file
60
usr/share/byobu/keybindings/f-keys.tmux.disable
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
###############################################################################
|
||||||
|
# disable byobu's tmux f-key keybindings
|
||||||
|
#
|
||||||
|
# Copyright (C) 2011 Dustin Kirkland
|
||||||
|
#
|
||||||
|
# Authors: Dustin Kirkland <kirkland@ubuntu.com>
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Undo Byobu's Keybindings
|
||||||
|
unbind-key -n F1
|
||||||
|
unbind-key -n S-F1
|
||||||
|
unbind-key -n F2
|
||||||
|
unbind-key -n C-F2
|
||||||
|
unbind-key -n S-F2
|
||||||
|
unbind-key -n C-S-F2
|
||||||
|
unbind-key -n F3
|
||||||
|
unbind-key -n F4
|
||||||
|
unbind-key -n M-Left
|
||||||
|
unbind-key -n M-Right
|
||||||
|
unbind-key -n M-Up
|
||||||
|
unbind-key -n M-Down
|
||||||
|
unbind-key -n S-F3
|
||||||
|
unbind-key -n S-F4
|
||||||
|
unbind-key -n S-Up
|
||||||
|
unbind-key -n S-Down
|
||||||
|
unbind-key -n S-Left
|
||||||
|
unbind-key -n S-Right
|
||||||
|
unbind-key -n C-F3
|
||||||
|
unbind-key -n C-F4
|
||||||
|
unbind-key -n C-Up
|
||||||
|
unbind-key -n C-Down
|
||||||
|
unbind-key -n C-Left
|
||||||
|
unbind-key -n C-Right
|
||||||
|
unbind-key -n F5
|
||||||
|
unbind-key -n S-F5
|
||||||
|
unbind-key -n C-F5
|
||||||
|
unbind-key -n F6
|
||||||
|
unbind-key -n S-F6
|
||||||
|
unbind-key -n C-F6
|
||||||
|
unbind-key -n F7
|
||||||
|
unbind-key -n M-NPage
|
||||||
|
unbind-key -n M-PPage
|
||||||
|
unbind-key -n F8
|
||||||
|
unbind-key -n F9
|
||||||
|
unbind-key -n M-F11
|
||||||
|
unbind-key -n C-F11
|
||||||
|
unbind-key -n S-F11
|
||||||
|
bind-key -n S-F12 source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux
|
|
@ -34,45 +34,7 @@ source /usr/share/tmux/screen-keys.conf
|
||||||
set -g prefix ^A,F12
|
set -g prefix ^A,F12
|
||||||
|
|
||||||
# Byobu's Keybindings
|
# Byobu's Keybindings
|
||||||
# Documented in: /usr/share/doc/byobu/help.tmux.txt
|
source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux
|
||||||
bind-key -n F1 new-window -k -n config byobu-config
|
|
||||||
bind-key -n S-F1 new-window -k -n help 'sensible-pager /usr/share/doc/byobu/help.tmux.txt'
|
|
||||||
bind-key -n F2 new-window
|
|
||||||
bind-key -n C-F2 display-panes \; split-window -h
|
|
||||||
bind-key -n S-F2 display-panes \; split-window -v
|
|
||||||
bind-key -n C-S-F2 new-session
|
|
||||||
bind-key -n F3 previous-window
|
|
||||||
bind-key -n F4 next-window
|
|
||||||
bind-key -n M-Left previous-window
|
|
||||||
bind-key -n M-Right next-window
|
|
||||||
bind-key -n M-Up choose-session \; send-keys Up \; send-keys Enter
|
|
||||||
bind-key -n M-Down choose-session \; send-keys Down \; send-keys Enter
|
|
||||||
bind-key -n S-F3 display-panes \; select-pane -t :.-
|
|
||||||
bind-key -n S-F4 display-panes \; select-pane -t :.+
|
|
||||||
bind-key -n S-Up display-panes \; select-pane -U
|
|
||||||
bind-key -n S-Down display-panes \; select-pane -D
|
|
||||||
bind-key -n S-Left display-panes \; select-pane -L
|
|
||||||
bind-key -n S-Right display-panes \; select-pane -R
|
|
||||||
bind-key -n C-F3 display-panes \; swap-pane -s :. -t :.- \; select-pane -t :.-
|
|
||||||
bind-key -n C-F4 display-panes \; swap-pane -s :. -t :.+ \; select-pane -t :.+
|
|
||||||
bind-key -n C-Up resize-pane -U
|
|
||||||
bind-key -n C-Down resize-pane -D
|
|
||||||
bind-key -n C-Left resize-pane -L
|
|
||||||
bind-key -n C-Right resize-pane -R
|
|
||||||
bind-key -n F5 source /usr/share/byobu/profiles/tmuxrc
|
|
||||||
bind-key -n S-F5 next-layout
|
|
||||||
bind-key -n C-F5 send-keys ". $BYOBU_PREFIX/bin/byobu-reconnect-sockets" \; send-keys Enter
|
|
||||||
bind-key -n F6 detach
|
|
||||||
bind-key -n S-F6 run-shell 'exec touch $BYOBU_RUN_DIR/no-logout' \; detach
|
|
||||||
bind-key -n C-F6 kill-pane
|
|
||||||
bind-key -n F7 copy-mode
|
|
||||||
bind-key -n M-NPage copy-mode \; send-keys NPage
|
|
||||||
bind-key -n M-PPage copy-mode \; send-keys PPage
|
|
||||||
bind-key -n F8 command-prompt -p "(rename-window)" "rename-window %%"
|
|
||||||
bind-key -n F9 new-window -k -n config byobu-config
|
|
||||||
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
|
|
||||||
|
|
||||||
set-option -g set-titles on
|
set-option -g set-titles on
|
||||||
set-option -g set-titles-string '#(whoami)@#H - byobu (#S)'
|
set-option -g set-titles-string '#(whoami)@#H - byobu (#S)'
|
||||||
|
|
|
@ -31,3 +31,4 @@ and some convenient keybindings:
|
||||||
Ctrl-F11 Join window into a vertical split
|
Ctrl-F11 Join window into a vertical split
|
||||||
Shift-F11 Join window into a horizontal split
|
Shift-F11 Join window into a horizontal split
|
||||||
F12 Escape sequence
|
F12 Escape sequence
|
||||||
|
Shift-F12 Toggle on/off Byobu's keybindings
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue