# Screen-like Control unbind C-b set-option -g prefix C-a bind-key C-a send-prefix set -g base-index 1 # start windows numbering at 1 setw -g pane-base-index 1 # make pane numbering consistent with windows setw -g automatic-rename on # rename window to reflect current program set -g renumber-windows on # renumber windows when a window is closed set -g default-terminal screen-256color set-option -g status-position top set -g status-keys vi set -g history-limit 10000 set-option -g set-titles on setw -g mode-keys vi setw -g monitor-activity on # status bar theme set -g status-style bg=colour59 set -g message-style fg=colour117,bg=colour59 set -g message-command-style fg=colour117,bg=colour59 setw -g window-status-style fg=colour117,bg=colour59 set -g pane-active-border-style fg=colour215 set -g pane-border-style fg=colour59 setw -g window-status-activity-style fg=colour215,bg=colour59 set -g status-right-style none set -g status-justify 'centre' set -g status-left-length '100' set -g status-left-length '100' set -g status 'on' setw -g window-status-separator '' #set -g status-left '#[fg=colour17,bg=colour215] #S #[fg=colour215,bg=colour59] #W #[fg=colour215,bg=colour59,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #(whoami)  #(uptime | cut -d " " -f 1,2,3)' #set -g status-right '#{prefix_highlight}#[fg=colour121,bg=colour235]  %a %h-%d  %H:%M #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour154] #{cpu_percentage} #{ram_percentage} #{battery_color_bg} #{battery_icon_status}#{battery_percentage}' #setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I  #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]' #setw -g window-status-current-format '#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]#[fg=red,bg=colour238] #I  #W #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]' set -g status-left "#[fg=colour17,bg=colour215] #S #[fg=colour215,bg=colour59,nobold,nounderscore,noitalics] #[fg=colour17,bg=colour141]#(uptime | cut -d ' ' -f 1,2,3 | awk '{print $1}')" set -g status-right "#{prefix_highlight}#[fg=colour121,bg=colour235]#[fg=colour61,bg=colour59,nobold,nounderscore,noitalics]#[fg=colour231,bg=colour61] %a %h-%d | %H:%M #[fg=colour141,bg=colour61,nobold,nounderscore,noitalics]#[fg=colour17,bg=colour141] #{cpu_percentage} #{ram_percentage} #{battery_color_bg} #{battery_percentage}" setw -g window-status-format "#[fg=colour231,bg=colour59] #I #[fg=colour231,bg=colour59]#W" setw -g window-status-current-format "#[fg=colour59,bg=colour59,nobold,nounderscore,noitalics]#[fg=colour117,bg=colour59] #I #[fg=colour117,bg=colour59]#W #[fg=colour59,bg=colour59,nobold,nounderscore,noitalics]" # copy mode bind Enter copy-mode # enter copy mode run -b 'tmux bind -t vi-copy v begin-selection 2> /dev/null || true' run -b 'tmux bind -T copy-mode-vi v send -X begin-selection 2> /dev/null || true' run -b 'tmux bind -t vi-copy C-v rectangle-toggle 2> /dev/null || true' run -b 'tmux bind -T copy-mode-vi C-v send -X rectangle-toggle 2> /dev/null || true' run -b 'tmux bind -t vi-copy y copy-selection 2> /dev/null || true' run -b 'tmux bind -T copy-mode-vi y send -X copy-selection-and-cancel 2> /dev/null || true' run -b 'tmux bind -t vi-copy Escape cancel 2> /dev/null || true' run -b 'tmux bind -T copy-mode-vi Escape send -X cancel 2> /dev/null || true' run -b 'tmux bind -t vi-copy H start-of-line 2> /dev/null || true' run -b 'tmux bind -T copy-mode-vi H send -X start-of-line 2> /dev/null || true' run -b 'tmux bind -t vi-copy L end-of-line 2> /dev/null || true' run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true' # copy to X11 clipboard if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"' if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"' # buffers bind b list-buffers # list paste buffers bind p paste-buffer # paste from the top paste buffer bind P choose-buffer # choose which buffer to paste from # create session bind C-c new-session # find session bind -r f command-prompt -p find-session 'switch-client -t %%' # move to last active window bind Tab last-window # Split window bind-key v split-window -h -c "#{pane_current_path}" bind-key s split-window -v -c "#{pane_current_path}" # pane resizing bind -r H resize-pane -L 6 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 # pane navigation bind -r h select-pane -L # move left bind -r j select-pane -D # move down bind -r k select-pane -U # move up bind -r l select-pane -R # move right bind > swap-pane -D # swap current pane with the next one bind < swap-pane -U # swap current pane with the previous one set -g display-panes-time 2000 set -g pane-base-index 1 # Use Alt-arrow keys without prefix key to switch panes 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 # Shift arrow to switch windows bind -n S-Left previous-window bind -n S-Right next-window set -sg escape-time 0 # No delay for escape key press set -sg repeat-time 300 # increase repeat timeout # Reload tmux config bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' # tmux-prefix-highlight settings set -g @prefix_highlight_fg 'red' set -g @prefix_highlight_bg 'blue' set -g @prefix_highlight_show_copy_mode 'on' set -g @prefix_highlight_show_sync_mode 'on' # tmux-sidebar settings #set -g @sidebar-tree-command 'tree -L 2 -C -F --noreport --dirsfirst -I node_modules' set -g @sidebar-tree-command 'tree -L 2 -CF --noreport --dirsfirst' #set -g @sidebar-tree-position 'right' set -g @sidebar-tree 'e' #set -g @sidebar-tree-focus 'w' #set -g @sidebar-tree-width '60' # tmux-open settings set -g @open-S 'https://www.google.com/' set -g @open 'o' set -g @open-editor 'C-o' # List of plugins set -g @plugin 'tmux-plugins/tmux-urlview' set -g @plugin 'tmux-plugins/tmux-cpu' set -g @plugin 'tmux-plugins/tmux-prefix-highlight' set -g @plugin 'tmux-plugins/tmux-sidebar' set -g @plugin 'tmux-plugins/tmux-open' set -g @plugin 'tmux-plugins/tmux-battery' set -g @plugin 'christoomey/vim-tmux-navigator' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm'