Last active
June 8, 2021 02:21
-
-
Save ziwon/5874217 to your computer and use it in GitHub Desktop.
tmux configuration with powerline, solarized color scheme & other useful plugins
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
# change prefix key | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# 'v' key for selection | |
bind-key -t vi-copy 'v' begin-selection | |
# base index | |
set -g base-index 1 | |
# enable 256-colors | |
set -g default-terminal "screen-256color" | |
# set vi key-bindings | |
set -g status-keys vi | |
set -g mode-keys vi | |
# set vi in shell | |
set -g @shell_mode 'vi' | |
# screen like | |
bind ^C new-window | |
bind ^D detach-client | |
bind ^N next-window | |
bind ^P previous-window | |
bind ^K confirm-before -p "kill-window #S? (y/n)" kill-window | |
bind ^O last-window | |
# rotate | |
bind ^R rotate-window -D | |
# set window notifications | |
set -g monitor-activity on | |
set -g visual-activity on | |
# automatically set window title | |
set -g automatic-rename on | |
# allows for faster key repetition | |
set -g repeat-time 0 | |
# copy selection color | |
# setw -g mode-fg black | |
# setw -g mode-bg green | |
# alert message line | |
set -g message-fg black | |
set -g message-bg green | |
# split | |
bind | split-window -h | |
bind _ split-window -v | |
# toggle synchronization | |
bind e setw synchronize-panes on | |
bind E setw synchronize-panes off | |
# mouse | |
set -g mouse-resize-pane on | |
set -g mouse-select-pane on | |
set -g mouse-select-window on | |
set -g mode-mouse on | |
# 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 | |
# status bar | |
set-option -g status on | |
set-option -g status-interval 5 | |
set-option -g status-utf8 on | |
set-option -g status-justify "centre" | |
set-option -g status-left-length 50 | |
set-option -g status-right-length 60 | |
set-option -g status-left "#(~/.tmux-powerline/powerline.sh left)" | |
set-option -g status-right "#(~/.tmux-powerline/powerline.sh right)" | |
# statusbar colors | |
set-option -g status-bg colour235 #base02 | |
set-option -g status-fg colour136 #yellow | |
set-option -g status-attr default | |
# window title colors | |
set-window-option -g window-status-fg colour244 | |
set-window-option -g window-status-bg default | |
set-window-option -g window-status-attr dim | |
# active window title colors | |
set-window-option -g window-status-current-fg colour166 #orange | |
set-window-option -g window-status-current-bg default | |
set-window-option -g window-status-current-attr bright | |
# pane border | |
set-option -g pane-border-fg colour235 #base02 | |
set-option -g pane-active-border-fg colour166 #base01 | |
# message text | |
set-option -g message-bg colour235 #base02 | |
set-option -g message-fg colour166 #orange | |
# pane number display | |
set-option -g display-panes-active-colour colour33 #blue | |
set-option -g display-panes-colour colour166 #orange | |
# list of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
# initialize tmux plugin manager | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The files are from https://github.com/erikw/tmux-powerline