Last active
November 15, 2018 05:53
-
-
Save xkuokuo/1c7390abe3fa208b872b2cb5f36d550d to your computer and use it in GitHub Desktop.
Sample tmux.conf
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
| ########################################### | |
| # Basic Controls | |
| ########################################### | |
| # Use hjkl to swith panes | |
| bind-key -r -T prefix k select-pane -U | |
| bind-key -r -T prefix j select-pane -D | |
| bind-key -r -T prefix h select-pane -L | |
| bind-key -r -T prefix l select-pane -R | |
| # Use hjkl to resize panes | |
| bind-key -r -T prefix M-k resize-pane -U 5 | |
| bind-key -r -T prefix M-j resize-pane -D 5 | |
| bind-key -r -T prefix M-h resize-pane -L 5 | |
| bind-key -r -T prefix M-l resize-pane -R 5 | |
| ############################################ | |
| # Vi-copy mode | |
| ############################################ | |
| set-window-option -g mode-keys vi | |
| bind-key -T copy-mode-vi 'v' send -X begin-selection | |
| bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel | |
| bind-key -T copy-mode-vi 'r' send -X rectangle-toggle | |
| ########################################### | |
| # Apperance | |
| ########################################### | |
| # loud or quiet? | |
| set-option -g visual-activity off | |
| set-option -g visual-bell off | |
| set-option -g visual-silence off | |
| set-window-option -g monitor-activity off | |
| set-option -g bell-action none | |
| # modes | |
| setw -g clock-mode-colour colour247 | |
| setw -g mode-attr bold | |
| setw -g mode-fg colour1 | |
| setw -g mode-bg colour18 | |
| # panes border color | |
| set -g pane-border-bg colour0 | |
| set -g pane-border-fg colour0 | |
| set -g pane-active-border-bg colour0 | |
| set -g pane-active-border-fg colour0 | |
| # statusbar | |
| set -g status-position bottom | |
| set -g status-justify left | |
| set -g status-bg colour69 | |
| set -g status-fg colour137 | |
| set -g status-attr dim | |
| set -g status-left '' | |
| # Status bar with CPU usage | |
| set -g status-right '#{cpu_bg_color} #{cpu_fg_color} CPU: #{cpu_icon} #{cpu_percentage} #[fg=colour233,bg=colour19,bold] %d/%m #[fg=colour233,bg=colour8,bold] %H:%M:%S ' | |
| set -g status-right-length 50 | |
| set -g status-left-length 20 | |
| # pane/window background color | |
| set -g window-style 'fg=colour247,bg=colour236' | |
| set -g window-active-style 'fg=colour250,bg=black' | |
| # window tab color | |
| setw -g window-status-current-fg colour255 | |
| setw -g window-status-current-bg colour63 | |
| setw -g window-status-current-attr bold | |
| setw -g window-status-current-format '#S:#I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F' | |
| setw -g window-status-fg colour252 | |
| setw -g window-status-bg colour69 | |
| setw -g window-status-attr none | |
| setw -g window-status-format '#S:#I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F' | |
| # window bell collor | |
| setw -g window-status-bell-attr bold | |
| setw -g window-status-bell-fg colour255 | |
| setw -g window-status-bell-bg colour1 | |
| # messages | |
| set -g message-attr bold | |
| #set -g message-fg colour232 | |
| #set -g message-bg colour16 | |
| ############################################ | |
| # Plugins Setup | |
| ############################################ | |
| # List of plugins | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-sensible' | |
| # Plugin for CPU/memory status | |
| set -g @plugin 'tmux-plugins/tmux-cpu' | |
| set -g @cpu_low_fg_color "#[fg=#bdbdbd]" | |
| set -g @cpu_medium_fg_color "#[fg=#ffffff]" | |
| set -g @cpu_high_fg_color "#[fg=#ffffff]" | |
| set -g @cpu_low_bg_color "#[bg=#000000]" | |
| set -g @cpu_medium_bg_color "#[bg=#000000]" | |
| set -g @cpu_high_bg_color "#[bg=#00000000]" | |
| # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
| run -b '~/.tmux/plugins/tpm/tpm' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very basic tmux configuration. Relying on Tmux Plugin Managers TPM for the CPU usage plugin.
Before copy paste this configuration to your ~/.tmux.conf