# Tmux configuration file

set-option -s escape-time 0

unbind C-b
unbind C-Space
set -g prefix C-Space
bind C-Space send-prefix

unbind Q
bind Q source-file $XDG_CONFIG_HOME/tmux/tmux.conf \; display "Reloaded config"

unbind '\'
unbind -
unbind %
unbind '"'

bind '\' split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'

bind c new-window -c '#{pane_current_path}'

bind -r ^ last-window
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R

bind -r H resize-pane -L 4
bind -r J resize-pane -D 4
bind -r K resize-pane -U 4
bind -r L resize-pane -R 4

bind -r n next-window
bind -r p previous-window

bind X confirm kill-window
bind T confirm kill-session

bind -r M set -g mouse

set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'

bind -r S run-shell "tmux new-window ~/.config/tmux/tmux-sessionizer"

set -g pane-border-indicators colour
set -g pane-active-border-style fg="#dbbc7f",bg=default
set -g pane-border-style fg="#1d2021",bg=default
set -g pane-border-lines single

set -g popup-border-style fg="#dbbc7f",bg=default
set -g popup-border-lines rounded

set -g clock-mode-colour "#dfa000"

set -g display-panes-active-colour "#dbbc7f"
set -g display-panes-time 10000

set -g window-size largest
set -g renumber-windows on

set -g base-index 1
setw -g pane-base-index 1

set -g status-position bottom
set -g status-style bg="#1d2021",fg="#d4be98",bold
set -g status-keys vi
set -g status-left-length 100
# set -g status-right '#{?client_prefix,#[fg=#000000]#[bg=#dfa000]#[bold] PREFIX ,}'
set -g status-right '#{?client_prefix,#[fg=#000000]#[bg=#dfa000]#[bold]      ,}'
set -wg window-status-current-style bg="#dbbc7f",fg="#1d2021"

set -g cursor-style blinking-underline

set -g focus-events on
set -g visual-bell off