Created
November 12, 2020 15:06
-
-
Save remynguyen96/0ffd8e185eefc4c1ee830fd510763464 to your computer and use it in GitHub Desktop.
Tmux configuration. (~/.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
| # C-b is not acceptable -- Vim uses it | |
| set -g prefix C-a | |
| bind C-a send-prefix | |
| unbind C-b | |
| # Quick reload | |
| bind r source-file ~/.tmux.conf | |
| # True colors mode | |
| # Add truecolor support | |
| set-option -ga terminal-overrides ",*:Tc" | |
| # Default terminal is 256 colors | |
| set -g default-terminal "screen-256color" | |
| # Statusbar has white on black/transparent background | |
| set -g status-bg default | |
| set -g status-fg default | |
| set -g @online_icon "ON" | |
| set -g @offline_icon "OFF" | |
| set -g status-right-length 65 | |
| set -g status-left-length 15 | |
| set -g status-right " #{prefix_highlight} 💪 Online: #{online_status} | 🔋 Battery: #{battery_percentage} | %H:%M %a %d-%b-%Y " | |
| setw -g window-status-format " #I #W " | |
| setw -g window-status-current-format " #I #W " | |
| setw -g window-status-current-style fg=black,bg=colour48 | |
| set -g @prefix_highlight_show_copy_mode 'on' | |
| set -g @prefix_highlight_copy_prompt 'Copy' | |
| set -g @prefix_highlight_copy_mode_attr 'fg=black,bg=yellow,bold' # default is 'fg=default,bg=yellow' | |
| set -g @prefix_highlight_show_sync_mode 'on' | |
| set -g @prefix_highlight_sync_mode_attr 'fg=black,bg=green' # default is 'fg=default,bg=yellow' | |
| # Rather than constraining window size to the maximum size of any client | |
| # connected to the *session*, constrain window size to the maximum size of any | |
| # client connected to *that window*. Much more reasonable. | |
| # super useful when using "grouped sessions" and multi-monitor setup | |
| setw -g aggressive-resize on | |
| # address vim mode switching delay (http://superuser.com/a/252717/65504) | |
| # Faster Command Sequences | |
| set -s escape-time 0 | |
| # increase scrollback buffer size | |
| set -g history-limit 50000 | |
| # Set scroll on tmux | |
| set -g mouse on | |
| # focus events enabled for terminals that support them | |
| set -g focus-events on | |
| ## Use vim keybindings in copy mode | |
| set-option -g mouse on | |
| # Set start window numbering at 1 | |
| set -g base-index 1 | |
| set -g pane-base-index 1 | |
| set-option -g allow-rename off | |
| # Keymap | |
| bind \\ split-window -h -c '#{pane_current_path}' # Split panes horizontal | |
| bind \/ split-window -v -c '#{pane_current_path}' # Split panes vertically | |
| unbind '"' | |
| unbind % | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| bind J resize-pane -D 10 | |
| bind K resize-pane -U 10 | |
| bind L resize-pane -L 10 | |
| bind H resize-pane -R 10 | |
| # Use vim keybindings in copy mode | |
| setw -g mode-keys vi | |
| # List of plugins | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-battery' | |
| set -g @plugin 'tmux-plugins/tmux-online-status' | |
| set -g @plugin 'tmux-plugins/tmux-prefix-highlight' | |
| # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
| run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment