Last active
March 13, 2019 08:09
-
-
Save rikioy/d888f0dfeaf5507c30f82d6db309aafa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #-- base --# | |
| set-option -g prefix C-a | |
| unbind C-b | |
| set -g default-terminal "screen-256color" | |
| set -g display-time 3000 | |
| set -g history-limit 10000 | |
| set -g base-index 1 | |
| set -g pane-base-index 1 | |
| set -s escape-time 0 | |
| bind r source-file ~/.tmux.conf \; display "Configuration Reloaded!" | |
| #-- statusbar --# | |
| set -g status-justify centre | |
| set -g status-left "#[fg=green]s#S:w#I.p#P#[default]" | |
| set -g status-left-attr bright | |
| set -g status-left-length 10 | |
| # 右下角 | |
| #set -g status-right '#[fg=green][#[fg=cyan]%Y-%m-%d#[fg=green]]' | |
| set -g status-right "#[fg=yellow,bright] %Y-%m-%d #[fg=green]%H:%M:%S #[default]#[fg=magenta,bright]#[default]" | |
| set -g visual-activity on | |
| setw -g monitor-activity on | |
| setw -g automatic-rename on | |
| # default statusbar colors | |
| set -g status-bg colour235 #base02 | |
| set -g status-fg colour136 #yellow | |
| set -g status-attr default | |
| # default window title colors | |
| setw -g window-status-fg colour244 | |
| setw -g window-status-bg default | |
| #setw -g window-status-attr dim | |
| # active window title colors | |
| setw -g window-status-current-bg default | |
| setw -g window-status-current-attr bright | |
| set-window-option -g window-status-current-format '*#[fg=yellow,bold][#{window_index}] #[fg=green]#{pane_current_command} #[fg=blue]#(echo "#{pane_current_path}" | rev | cut -d'/' -f-2 | rev)' | |
| set-window-option -g window-status-format ' #[fg=red,bold][#{window_index}] #[fg=green]#{pane_current_command} #[fg=blue]#(echo "#{pane_current_path}" | rev | cut -d'/' -f-2 | rev)' | |
| set-option -g status-interval 1 | |
| # pane border | |
| set -g pane-active-border-fg '#55ff55' | |
| set -g pane-border-fg '#555555' | |
| # message text | |
| set -g message-bg colour235 #base02 | |
| set -g message-fg colour166 #orange | |
| # pane number display | |
| set -g display-panes-active-colour colour33 #blue | |
| set -g display-panes-colour colour166 #orange | |
| # clock | |
| setw -g clock-mode-colour colour64 #green | |
| # split windows like vim. - Note: vim's definition of a horizontal/vertical split is reversed from tmux's | |
| unbind '"' | |
| unbind % | |
| unbind s | |
| bind s split-window -v | |
| bind S split-window -v -l 40 | |
| bind v split-window -h | |
| bind V split-window -h -l 120 | |
| # navigate panes with hjkl | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| # resize panes like vim | |
| bind < resize-pane -L 10 | |
| bind L resize-pane -L 100 | |
| bind > resize-pane -R 10 | |
| bind R resize-pane -R 100 | |
| bind - resize-pane -D 5 | |
| bind D resize-pane -D 36 | |
| bind + resize-pane -U 5 | |
| bind U resize-pane -U 35 | |
| # swap panes | |
| bind ^u swapp -U | |
| bind ^d swapp -D | |
| bind q killp | |
| bind c new-window -c "#{pane_current_path}" | |
| # reload ~/.tmux.conf | |
| bind R source-file ~/.tmux.conf \; display-message "Config reloaded.." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment