1
0
Fork 0
dotfiles/.config/tmux/tmux.conf

74 lines
2.6 KiB
Plaintext

# Start windows at 0 and panes at 1
# This is done because, I run a few items that "log" to the console on headless
# machines, so having those run on window 0 gives me a total of 10 panes, 9 usable
set -g base-index 0
setw -g pane-base-index 1
# for Neovim, idk why
set -g focus-events on
# Use Ctrl + Space for tmux
unbind C-b
set -g prefix C-space
# Set 265color for tmux
if-shell 'uname | grep -q Linux' \
'set -g default-terminal "tmux-256color"' \
'set -g default-terminal "xterm-256color"'
set -ga terminal-overrides ",alacritty:Tc"
set -ga terminal-overrides ",*256col*:Tc"
#set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-environment -g COLORTERM "truecolor"
#set-window-option -g automatic-rename on
set -g automatic-rename on
set-option -g set-titles on
set -g history-limit 100000
# vi mode
set-window-option -g mode-keys vi
set -g status-keys vi
set -g monitor-activity on
set -g visual-activity both
set -sg escape-time 0
set -g mouse on
# status
set -g status-bg black
set -g status-fg white
set -g status-interval 10
# show `session_name:` to the leftmost bottom corner
set -g status-left '#[fg=colour245] #S: '
set -g status-left-length 0
# status format for the window that you are active on
setw -g window-status-current-format ' #I#[fg=yellow,bright]:#[fg=white,bright]#W#[fg=red,bright]#F '
# normal format for the window
setw -g window-status-format ' #I#[fg=gray,dark]:#[fg=gray,bright]#W#[fg=white,bright]#F '
# show date and time in the rightmost bottom corner `DayOfWeek date-month hour:minute`
set -g status-right '#[fg=color233,bg=color241,bold] %a #[fg=color233,bg=color245,bold] %d-%m %H:%M '
set -g status-right-length 50
# Clipboard related, I don't know shit about this
set-option -g update-environment " DISPLAY"
set-option -s set-clipboard off
bind P paste-buffer
#bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
#unbind -T copy-mode-vi y
#bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe 'xclip -in -selection clipboard &> /dev/null'
bind -T copy-mode-vi Enter send-keys -X cancel
#bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection c"
#bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
#bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'
unbind r
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded tmux.conf"