Skip to content

Instantly share code, notes, and snippets.

@jhjguxin
Last active December 29, 2015 12:29
Show Gist options
  • Save jhjguxin/7671203 to your computer and use it in GitHub Desktop.
Save jhjguxin/7671203 to your computer and use it in GitHub Desktop.
byobu tmux

byobu-tmux

sudo apt-get install screen byobu

Byobu包装过的Tmux将其配置文件放在了「~/.byoburc.tmux」下面,因此编辑这个文件,写如以下内容:

set-window-option -g mode-keys vi bind C-h select-pane -L bind c-j select-pane -D bind C-k select-pane -U bind C-l select-pane -R 然后,使用的时候就是这样:

运行「byobu-tmux」进入Tmux后端的Byobu 先按「Ctrl+A」,松开,再按「|」,竖切一个格子 先按「Ctrl+A」,松开,再按「%」,横切一个格子 然后,怎么在这三个屏之间跳转呢?想想Vim的「hjkl」,这时只要按住「Ctrl」,再一齐按下「A」和「J」,就移到下面这个窗格去了。其他以此类推。

byobu-config

Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:

  F1                             * Used by X11 *
    Shift-F1                     Display this help
  F2                             Create a new window
    Shift-F2                     Create a horizontal split
    Ctrl-F2                      Create a vertical split
    Ctrl-Shift-F2                Create a new session
  F3/F4                          Move focus among windows
    Alt-Left/Right               Move focus among windows
    Alt-Up/Down                  Move focus among sessions
    Shift-Left/Right/Up/Down     Move focus among splits
    Shift-F3/F4                  Move focus among splits
    Ctrl-F3/F4                   Move a split
    Ctrl-Shift-F3/F4             Move a window
    Shift-Alt-Left/Right/Up/Down Resize a split
  F5                             Reload profile, refresh status
    Alt-F5                       Toggle UTF-8 support, refresh status
    Shift-F5                     Toggle through status lines
    Ctrl-F5                      Reconnect ssh/gpg/dbus sockets
    Ctrl-Shift-F5                Change status bar's color randomly
  F6                             Detach session and then logout
    Shift-F6                     Detach session and do not logout
    Alt-F6                       Detach all clients but yourself
    Ctrl-F6                      Kill split in focus
  F7                             Enter scrollback history
    Alt-PageUp/PageDown          Enter and move through scrollback
  F8                             Rename the current window
    Shift-F8                     Toggle through split arrangements
    Ctrl-F8                      Restore a split-pane layout
    Ctrl-Shift-F8                Save the current split-pane layout
  F9                             Launch byobu-config window
    Shift-F9                     Save history to $BYOBU_RUN_DIR/printscreen
  F10                            * Used by X11 *
  F11                            * Used by X11 *
    Alt-F11                      Expand split to a full window
    Shift-F11                    Join window into a horizontal split
    Ctrl-F11                     Join window into a vertical split
  F12                            Escape sequence
    Shift-F12                    Toggle on/off Byobu's keybindings
    Alt-F12                      Toggle on/off Byobu's mouse support
    Ctrl-Shift-F12               Mondrian squares
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment