Created
April 22, 2017 03:45
-
-
Save AsakuraFuuko/0ea2b7e6ec891b39294473bac159031b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example: /usr/share/doc/tmux/examples/ | |
# {{{ screen-keys.conf | |
# $Id: screen-keys.conf,v 1.7 2010/07/31 11:39:13 nicm Exp $ | |
# | |
# By Nicholas Marriott. Public domain. | |
# | |
# This configuration file binds many of the common GNU screen key bindings to | |
# appropriate tmux key bindings. Note that for some key bindings there is no | |
# tmux analogue and also that this set omits binding some commands available in | |
# tmux but not in screen. | |
# | |
# Note this is only a selection of key bindings and they are in addition to the | |
# normal tmux key bindings. This is intended as an example not as to be used | |
# as-is. | |
# Set the prefix to ^A. | |
unbind C-b | |
set -g prefix ^A | |
bind a send-prefix | |
# Bind appropriate commands similar to screen. | |
# lockscreen ^X x | |
unbind ^X | |
bind ^X lock-server | |
unbind x | |
bind x lock-server | |
# screen ^C c | |
unbind ^C | |
bind ^C new-window | |
# bind c | |
bind c new-window | |
# detach ^D d | |
unbind ^D | |
bind ^D detach | |
# displays * | |
unbind * | |
bind * list-clients | |
# next ^@ ^N sp n | |
unbind ^@ | |
bind ^@ next-window | |
unbind ^N | |
bind ^N next-window | |
unbind " " | |
bind " " next-window | |
unbind n | |
bind n next-window | |
# title A | |
unbind A | |
bind A command-prompt "rename-window %%" | |
# other ^A | |
unbind ^A | |
bind ^A last-window | |
# prev ^H ^P p ^? | |
unbind ^H | |
bind ^H previous-window | |
unbind ^P | |
bind ^P previous-window | |
unbind p | |
bind p previous-window | |
unbind BSpace | |
bind BSpace previous-window | |
# windows ^W w | |
unbind ^W | |
bind ^W list-windows | |
unbind w | |
bind w list-windows | |
# quit \ | |
unbind \ | |
bind \ confirm-before "kill-server" | |
# kill K k | |
unbind K | |
bind K confirm-before "kill-window" | |
unbind k | |
bind k confirm-before "kill-window" | |
# redisplay ^L l | |
unbind ^L | |
bind ^L refresh-client | |
unbind l | |
bind l refresh-client | |
# split -v | | |
unbind | | |
bind | split-window | |
# :kB: focus up | |
unbind Tab | |
bind Tab select-pane -t:.+ | |
unbind BTab | |
bind BTab select-pane -t:.- | |
# " windowlist -b | |
unbind '"' | |
bind '"' choose-window | |
# }}} | |
# {{{ vim-keys.conf | |
# $Id: vim-keys.conf,v 1.2 2010/09/18 09:36:15 nicm Exp $ | |
# | |
# vim-keys.conf, v1.2 2010/09/12 | |
# | |
# By Daniel Thau. Public domain. | |
# | |
# This configuration file binds many vi- and vim-like bindings to the | |
# appropriate tmux key bindings. Note that for many key bindings there is no | |
# tmux analogue. This is intended for tmux 1.3, which handles pane selection | |
# differently from the previous versions | |
# split windows like vim | |
# vim's definition of a horizontal/vertical split is reversed from tmux's | |
bind s split-window -v | |
bind v split-window -h | |
# move around panes with hjkl, as one would in vim after pressing ctrl-w | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# resize panes like vim | |
# feel free to change the "1" to however many lines you want to resize by, only | |
# one at a time can be slow | |
bind < resize-pane -L 1 | |
bind > resize-pane -R 1 | |
bind - resize-pane -D 1 | |
bind + resize-pane -U 1 | |
# bind : to command-prompt like vim | |
# this is the default in tmux already | |
bind : command-prompt | |
# vi-style controls for copy mode | |
setw -g mode-keys vi | |
# }}} | |
set -g default-terminal "screen-256color" # + "tmux -2" => 256 color | |
set -g status-justify left | |
set -g status-interval 15 # 15 sec refresh | |
set -g display-time 3000 | |
set -g status-bg black | |
set -g status-fg white | |
set-window-option -g window-status-current-fg blue | |
set-window-option -g window-status-current-bg yellow | |
set-window-option -g window-status-current-attr default # bright | |
set -g status-left-length 15 | |
set -g status-right-length 55 | |
#set -g status-left "#[fg=white,bg=blue] > #I #W < #[default] |" # 0:bash | |
set -g status-left "#[fg=white,bg=blue] > #S < #[default] |" # session-name | |
set -g status-right "#[fg=red,bright][ #[fg=cyan]#H #[fg=red]]#[default] #[fg=yellow,bright]- %Y.%m.%d #[fg=green]%H:%M #[default]#[fg=magenta,bright](load: #(cat /proc/loadavg | cut -d \" \" -f 1,2,3))#[default]" | |
setw -g mouse-resize-pane on | |
setw -g mouse-select-pane on | |
setw -g mouse-select-window on | |
setw -g mode-mouse on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://blog.longwin.com.tw/2011/04/tmux-learn-screen-config-2011/