Created
November 17, 2018 21:22
-
-
Save Hasil-Sharma/bf8514ac57030157be7cacd27d301536 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
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % | |
# reload config file | |
bind r source-file ~/.tmux.conf \; display-message "Config reloaded" | |
# clear history | |
bind k clear-history \; display-message "History Cleared" | |
# switch panes using Alt-arrow without prefix | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# swtich windos using shift arrow | |
bind -n S-Left previous-window | |
bind -n S-Right next-window | |
# don't renam windows automatically | |
set-option -g allow-rename off | |
# quick view of processes | |
bind '~' split-window "exec htop" | |
#send keystrokes to all the panes | |
bind s setw synchronize-panes on \; display-message "Synchronize started" | |
bind x setw synchronize-panes off \; display-message "Synchronize stopped" | |
# Design Changes | |
# Copy Paste Buffer | |
bind P paste-buffer | |
bind-key -T copy-mode-vi v send-keys -X begin-selection | |
bind-key -T copy-mode-vi y send-keys -X copy-selection | |
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle | |
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard" | |
# panes | |
set -g pane-border-fg black | |
set -g pane-active-border-fg brightred | |
#### statusbar #### | |
set -g status-interval 10 | |
set -g status-left-length 30 | |
set -g status-justify centre # center align window list | |
set -g status-left '#[fg=green] #S #[default]' | |
set -g status-right '#[fg=blue,bright]Auto Save: #{continuum_status} #[fg=blue,bright]Up:#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[default]:: #[fg=cyan]#(cut -d " " -f 1-4 /proc/loadavg) ' | |
# default statusbar colors | |
set -g status-fg white | |
set -g status-bg default | |
set -g status-attr bright | |
# default window title colors | |
set-window-option -g window-status-fg white | |
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 white | |
set-window-option -g window-status-current-bg default | |
set-window-option -g window-status-current-attr bright | |
# command/message line colors | |
set -g message-fg white | |
set -g message-bg black | |
set -g message-attr bright | |
setw -g mouse on | |
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W " | |
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W " | |
#set -g status-left 'Session:#[fg=green](#S) #[fg=white]Directory:#[fg=cyan]#(pwd)' | |
set-option -g pane-active-border-bg default | |
set-option -g pane-active-border-fg colour208 | |
# Start windows and panes at 1, not 0 | |
set -g base-index 1 | |
setw -g pane-base-index 1 | |
set-window-option -g mode-keys vi | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @continuum-restore 'on' | |
set -g @continuum-boot 'on' | |
set -g @continuum-save-interval '15' | |
# 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