tmux.conf (3044B)
1 # Basic settings 2 set -a terminal-features 'tmux-256color:RGB' 3 4 # Start numbering at 1 5 set -g base-index 1 6 set -g renumber-windows on 7 8 # Status bar 9 # set -g status "on" 10 # set -g status-position top 11 # set -g status-justify absolute-centre 12 # set -g status-style "bg=default" 13 # set -g window-status-current-style "bg=white,fg=black,bold" 14 # set -g status-interval 5 15 # set -g status-left "#S" 16 # set -g status-right "" 17 set -g status-position top 18 set -g status-interval 5 19 set -g status-left-length 30 20 set -g status-right-length 50 21 set -g window-status-separator "" 22 23 # Theme 24 set -g status-style "bg=default,fg=default" 25 set -g status-left "#[fg=black,bg=blue,bold] #S #[bg=default] " 26 # set -g status-right "#[fg=blue]#{?client_prefix,PREFIX ,}#{?window_zoomed_flag,ZOOM ,}#[fg=brightblack]#h " 27 set -g status-right "" 28 set -g window-status-format "#[fg=brightblack] #I:#W " 29 set -g window-status-current-format "#[fg=blue,bold] #I:#W " 30 set -g pane-border-style "fg=brightblack" 31 set -g pane-active-border-style "fg=blue" 32 set -g message-style "bg=default,fg=blue" 33 set -g message-command-style "bg=default,fg=blue" 34 set -g mode-style "bg=blue,fg=black" 35 setw -g clock-mode-colour blue 36 37 # Change the default prefix to C-a 38 unbind C-b 39 set-option -g prefix C-a 40 bind-key C-a send-prefix 41 42 # Split windows (opens in same directory as current window) 43 unbind % 44 unbind '"' 45 bind \\ split-window -h -c "#{pane_current_path}" 46 bind - split-window -v -c "#{pane_current_path}" 47 bind v split-window -h -c "#{pane_current_path}" 48 bind s split-window -v -c "#{pane_current_path}" 49 50 # Fast session switching 51 unbind-key s 52 bind -n M-s choose-tree -Zs # filtered session/window/tree view 53 bind -n M-S switch-client -l # jump to last session instantly 54 55 # Alt+hjkl to switch panes w/o prefix 56 bind -n M-h select-pane -L 57 bind -n M-j select-pane -D 58 bind -n M-k select-pane -U 59 bind -n M-l select-pane -R 60 61 # Alt+number to switch windows 62 bind -n M-1 select-window -t 1 63 bind -n M-2 select-window -t 2 64 bind -n M-3 select-window -t 3 65 bind -n M-4 select-window -t 4 66 bind -n M-5 select-window -t 5 67 bind -n M-6 select-window -t 6 68 bind -n M-7 select-window -t 7 69 bind -n M-8 select-window -t 8 70 bind -n M-9 select-window -t 9 71 72 # Vim style copying 73 set-window-option -g mode-keys vi 74 bind-key -T copy-mode-vi v send-keys -X begin-selection 75 bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel 76 bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle 77 unbind -T copy-mode-vi MouseDragEnd1Pane 78 79 bind-key x kill-pane # Skip kill pane prompt 80 set -g detach-on-destroy off # don't exit from tmux when closing a session 81 82 # Setting default shell to zsh 83 set-option -g default-shell /usr/bin/bash 84 85 # reload config file with a keystroke 86 unbind r 87 bind r source-file ~/.config/tmux/tmux.conf 88 89 bind-key -n M-t run-shell "tmux neww ~/.local/bin/tmux-sessionizer" 90 bind-key -r M-h run-shell "tmux neww tmux-sessionizer -s 0" 91 bind-key -r M-j run-shell "tmux neww tmux-sessionizer -s 1" 92 bind-key -r M-k run-shell "tmux neww tmux-sessionizer -s 2" 93 bind-key -r M-l run-shell "tmux neww tmux-sessionizer -s 3" 94