Skip to content

Instantly share code, notes, and snippets.

@Olex1313
Created March 25, 2025 07:29
Show Gist options
  • Save Olex1313/b762ec17eb9c57de43898bfa5c978568 to your computer and use it in GitHub Desktop.
Save Olex1313/b762ec17eb9c57de43898bfa5c978568 to your computer and use it in GitHub Desktop.
tmux.conf
set -g default-terminal "xterm-256color"
set -g prefix C-w
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind P paste-buffer
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
setw -g mouse on
set-option -s set-clipboard on
set-option -g default-command "reattach-to-user-namespace -l zsh"
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour166 fg=colour131 dim'
# set -g status-style 'bg=colour234 fg=colour131 dim'
set -g status-interval 2
set -g status-left ''
# set -g status-right '#{prefix_highlight} #(gitmux #{pane_current_path}) #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right '#{prefix_highlight} #[fg=colour231,bg=colour04]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default] #[fg=colour233,bg=colour245,bold] %H:%M:%S '
# set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=colour172 bg=colour238 bold'
# setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour226]#F '
setw -g window-status-style 'fg=colour138 bg=colour235 none'
# setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# bind -r C-h resize-pane -L 2
# bind -r C-j resize-pane -D 2
# bind -r C-k resize-pane -U 2
# bind -r C-l resize-pane -R 2
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment