Skip to content

Instantly share code, notes, and snippets.

@AntonC9018
Created May 18, 2024 22:41
Show Gist options
  • Save AntonC9018/a70e7fbcd57c0a974bbcf34671fe39fc to your computer and use it in GitHub Desktop.
Save AntonC9018/a70e7fbcd57c0a974bbcf34671fe39fc to your computer and use it in GitHub Desktop.
Tmux config
set -ga update-environment EDITOR
# https://github.com/artemave/tmux_super_fingers
run-shell ~/.tmux/plugins/tmux_super_fingers/tmux_super_fingers.tmux
bind C-r source-file ~/.tmux.conf \; display "Reloaded!"
set -g mouse on
set-option -g history-limit 20000
bind \` switch-client -t'{marked}'
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
bind -r "<" swap-window -d -t -1
bind -r ">" swap-window -d -t +1
set -sg escape-time 0
bind c new-window -c "#{pane_current_path}"
bind h choose-window 'join-pane -s "%%"'
bind l break-pane
# STATUS LINE
set -g status on
set -g status-interval 1
set -g status-justify centre
set -g status-style fg=white,bg=black
# set -g status-format 2
# Highlight the current window.
setw -g window-status-current-style fg=black,bg=blue,bright
# LEFT STATUS
set -g status-left-length 100
set -g status-left-style default
set -g status-left " "
# RIGHT STATUS
set -g status-right-length 100
set -g status-right-style default
set -g status-right " "
# Selection / copy / paste
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi V send -X select-line
bind-key -T copy-mode-vi C-v send -X rectangle-toggle
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -selection clipboard -in'
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-no-clear
bind-key -n C-1 select-window -t 1
bind-key -n C-2 select-window -t 2
bind-key -n C-3 select-window -t 3
bind-key -n C-4 select-window -t 4
bind-key -n C-5 select-window -t 5
bind-key -n C-6 select-window -t 6
bind-key -n C-7 select-window -t 7
bind-key -n C-8 select-window -t 8
bind-key -n C-9 select-window -t 9
# Prefix + Esc to toggle vi mode
bind-key -T copy-mode-vi Escape send -X cancel
bind-key Escape copy-mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment