mirror of
https://github.com/anthonyoteri/dotfiles.git
synced 2026-06-05 23:56:52 -04:00
82 lines
3.0 KiB
Bash
82 lines
3.0 KiB
Bash
# -- general ------------------------------------------------------------------
|
|
|
|
set -g default-terminal "xterm-256color"
|
|
setw -g xterm-keys on
|
|
set -sg repeat-time 600
|
|
|
|
set -q -g status-utf8 on
|
|
setw -q -g utf8 on
|
|
|
|
set -g mouse on
|
|
|
|
set-option -g default-shell /usr/bin/bash
|
|
# -- display ------------------------------------------------------------------
|
|
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
|
|
setw -g automatic-rename on
|
|
set -g renumber-windows on
|
|
|
|
set -g set-titles on
|
|
|
|
set -g display-panes-time 800
|
|
set -g display-time 1000
|
|
|
|
set -w -g wrap-search off
|
|
|
|
# -- activity -----------------------------------------------------------------
|
|
|
|
set -g monitor-activity on
|
|
set -g visual-activity off
|
|
|
|
# -- copy/paste ---------------------------------------------------------------
|
|
|
|
bind 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"'
|
|
# copy to macOS clipboard
|
|
if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"'
|
|
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
|
|
# copy to Windows clipboard
|
|
if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"'
|
|
if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"'
|
|
|
|
# -- buffers ------------------------------------------------------------------
|
|
|
|
bind b list-buffers
|
|
bind p paste-buffer
|
|
bind P choose-buffer
|
|
|
|
# -- tmux plugin manager ------------------------------------------------------
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
set -g @plugin 'tmux-plugins/tmux-copycat'
|
|
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
|
set -g @plugin 'tmux-plugins/tmux-open'
|
|
set -g @plugin 'tmux-plugins/tmux-battery'
|
|
set -g @plugin 'dracula/tmux'
|
|
|
|
set -g @dracula-plugins "battery cpu-usage ram-usage weather time"
|
|
set -g @dracula-show-powerline true
|
|
set -g @dracula-border-contrast true
|
|
|
|
run ~/.tmux/plugins/tpm/tpm
|
|
|