## Mouse options set -g mouse on #bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" #bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" ## Start counting windows from 1 set -g base-index 1 setw -g mode-keys vi # Copy/paste. Selecting any text with mouse automatically sopies it to the clipboard bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i -p -b" bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer" bind -n C-S-v run "xsel -o | tmux load-buffer - ; tmux paste-buffer" bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b" bind-key -T copy-mode-vi C-c send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b" bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer" #bind -n C-S-c "copy-pipe "xsel -i -p -b"" #bind-key C-S-c "copy-pipe "xsel -i -p -b"" ## titles set-window-option -g automatic-rename on set-option -g set-titles on ## Toggle copymode bind Escape copy-mode ##open and close splits bind - split-window -v bind % split-window -h bind Z resize-pane -Z bind M-k resize-pane -U 5 bind M-j resize-pane -D 5 bind M-h resize-pane -L 5 bind M-l resize-pane -R 5 # Use Ctrl-arrows to navigate text set-window-option -g xterm-keys on set -as terminal-overrides ',st*:Ss@' # 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 # Use Alt-Shift-arrow keys without prefix key to switch panes (for better micro compatibility) bind -n C-S-H select-pane -L bind -n C-S-L select-pane -R bind -n C-S-K select-pane -U bind -n C-S-J select-pane -D # bind -n H-h select-pane -L # bind -n H-l select-pane -R # bind -n H-k select-pane -U # bind -n H-j select-pane -D bind h select-pane -L bind l select-pane -R bind k select-pane -U bind j select-pane -D # Shift arrow to switch windows bind S-PageDown prev bind S-PageUp next # No delay for escape key press set -sg escape-time 0 # Reload tmux config bind r source-file ~/.tmux.conf #unbind C-b #set -g prefix C-a set -g prefix M-a set -g prefix2 C-b # GNU-Screen compatible prefix bind C-b send-prefix -2 set -g pane-active-border-fg colour79 set -g pane-active-border-fg '#98971a' setw -g aggressive-resize on # ---------------------- # Status Bar # ----------------------- set-option -g status on # turn the status bar on set -g status-interval 15 # set update frequencey (default 15 seconds) set -g status-justify centre # center window list for clarity set-option -g status-position top # position the status bar at top of screen # visual notification of activity in other windows setw -g monitor-activity on set -g visual-activity on # set color for status bar # # set-option -g status-bg colour00 #base02 set-option -g status-bg default #base02 set-option -g status-fg colour135 #yellow set-option -g status-attr dim # set window list colors - red for active and cyan for inactive set-window-option -g window-status-fg colour29 #base0 set-window-option -g window-status-bg colour236 set-window-option -g window-status-attr dim set-window-option -g window-status-current-fg colour79 #orange set-window-option -g window-status-current-bg colour235 set-window-option -g window-status-current-attr bright # show host name set -g status-left-length 70 set -g status-left "cpu: #{cpu_icon} #{cpu_percentage} #[fg=green]: #h " # don't show anything on the left side of the bar # set -g status-left "" # show session name, window & pane number, date and time on right side of # status bar set -g status-right-length 60 # set -g status-right "#[fg=blue]#s #i:#p #[fg=yellow]:: %d/%m/%y #[fg=green]:: %h:%m" # set -g status-right "#[fg=blue]#s #i:#p #[fg=yellow]:: %d/%m/%y #[fg=green]:: #{battery_percentage} #{battery_remain}:: %h:%m" # set -g status-right " #[fg=yellow] %d/%m/%y #[fg=green]:: #{battery_percentage} #{battery_remain}" set -g status-right " #[fg=green] Bat: #[fg=blue]#{battery_percentage} #{battery_remain} :: %Y-%m-%d :: #[fg=yellow] %H:%M" # don't show anything on the right side of the bar #set -g status-right "" #set -g default-command "/usr/bin/zsh" #set -g default-shell "/usr/bin/fish" # set -g default-terminal screen-256color # set -as terminal-overrides ',st*:kind@:kri@' set -g default-terminal 'screen-256color' set -ga terminal-overrides ',screen-256color:tc' # better mouse support # set -g @prevent-scroll-for-fullscreen-alternate-buffer 'on' # set -g @scroll-speed-num-lines-per-scroll '3' # run-shell /usr/share/tmux/tmux-better-mouse-mode/scroll_copy_mode.tmux # list of plugins set -g @plugin 'tmux-plugins/tpm' #set -g @plugin 'tmux-plugins/tmux-sensible' # other examples: # set -g @plugin 'github_username/plugin_name' # set -g @plugin 'git@github.com/user/plugin' # set -g @plugin 'git@bitbucket.com/user/plugin' set -g @plugin 'tmux-plugins/tmux-resurrect' #set -g @plugin 'tmux-plugins/tmux-continuum' set -g @plugin 'tmux-plugins/tmux-battery' set -g @plugin 'tmux-plugins/tmux-cpu' set -g @plugin 'tmux-plugins/tmux-sidebar' set -g @sidebar-tree-command 'tree -c' #set -g @plugin 'christoomey/vim-tmux-navigator' #set -g @plugin 'shaneog/tmux-colors-gotham' # set -g @plugin 'seebi/tmux-colors-solarized' #set -g @plugin 'arcticicestudio/nord-tmux' #set -g @plugins 'egel/tmux-gruvbox' # pane movement bind-key M command-prompt -p "join pane from:" "join-pane -s '%%'" bind-key m command-prompt -p "send pane to:" "join-pane -t '%%'" # set -g @resurrect-capture-pane-contents 'on' # status bar # set-option -g status-bg colour234 # set-option -g status-fg colour252 # # # #Window titles # set-window-option -g window-status-fg colour252 # set-window-option -g window-status-bg default # set-window-option -g window-status-attr dim # # # #Active window title # set-window-option -g window-status-current-fg colour135 # 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 colour234 # set-option -g pane-active-border-fg colour234 # # #Message text # set-option -g message-bg colour234 # set-option -g message-fg colour252 # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm'