# Rebind prefix key to Ctrl+a for easier access
unbind C-b
set-option -g prefix C-a
set-option -g remain-on-exit off
bind-key C-a send-prefix

set-option -g focus-events on

unbind c
bind c new-window -c "#{pane_current_path}"

bind c-r source-file ~/.tmux.conf \; display "Reloaded!"

set -g mouse on

bind c-h select-pane -L
bind c-j select-pane -D
bind c-k select-pane -U
bind c-l select-pane -R

bind-key c-p switch-client -l

bind c-g popup -E -w 100% -h 100% -d "#{pane_current_path}" -b rounded lazygit
bind c-t popup -E -w 100% -h 100% -b rounded -d "#{pane_current_path}"
bind c-s popup -E -w 100% -h 100% -b rounded "sesh"
bind c-x confirm-before -p "Kill current session #S? (y/n)" kill-session

bind j command-prompt -p "Join window:" "join-pane -h -s %1"
bind b break-pane

set -g default-terminal "tmux-256color"
set -as terminal-overrides ",xterm-256color:Tc"
set -as terminal-features ',xterm-256color:sync'
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on

white="#ffffff"
black="#000000"
gray_light="#D8DEE9"
gray_medium="#ABB2BF"
gray_dark="#3B4252"
green_soft="#A3BE8C"
blue_muted="#81A1C1"
cyan_soft="#88C0D0"
set -g status-position top
set -g status-left-length 100
set -g status-style "fg=${gray_light},bg=default"
set -g status-left "#[fg=${green_soft},bold]  #S #[fg=${gray_light},nobold] | "
set -g status-right ""
set -g window-status-current-format " #[fg=${white},bold]#I.#W "
set -g window-status-format " #I.#W "
set -g message-style "fg=${gray_medium},bg=default"
set -g mode-style "fg=${gray_dark},bg=${blue_muted}"
set -g pane-border-style "fg=${gray_dark}"
set -g pane-active-border-style "fg=${gray_medium}"
