##### Core #####
set -g mouse on
set -g history-limit 200000
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g focus-events on
set -g status-interval 5
set -g set-clipboard on
set -g escape-time 0

# Better key response + copy mode
setw -g mode-keys vi

# Easy reload
bind r source-file ~/.tmux.conf \; display-message "✅ reloaded ~/.tmux.conf"

##### Truecolor + italics (nice themes) #####
set -g default-terminal "tmux-256color"
set -as terminal-overrides ",*:Tc"
set -as terminal-overrides ",xterm-256color:RGB"
set -as terminal-overrides ",*:sitm=\E[3m"

##### Splits + navigation (feel “modern”) #####
# Split like a tiling WM
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %

# Vim-ish pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# Resize with Alt + hjkl
bind -n M-h resize-pane -L 5
bind -n M-j resize-pane -D 3
bind -n M-k resize-pane -U 3
bind -n M-l resize-pane -R 5

##### Look & feel (transparent background) #####
# Transparent base (lets your terminal transparency show through)
set -g status-style "bg=default,fg=#cdd6f4"

# Pane borders
set -g pane-border-style "fg=#45475a,bg=default"
set -g pane-active-border-style "fg=#89b4fa,bg=default"

# Message / command line
set -g message-style "bg=default,fg=#f5c2e7"
set -g message-command-style "bg=default,fg=#a6e3a1"

# Window tabs
setw -g window-status-style "bg=default,fg=#a6adc8"
setw -g window-status-current-style "bg=default,fg=#f9e2af,bold"
setw -g window-status-format "  #I:#W  "
setw -g window-status-current-format "   #I:#W  "

##### Status bar content (pretty segments) #####
set -g status-left-length 80
set -g status-right-length 120

# Left: session + path
set -g status-left "#[bg=default,fg=#89b4fa,bold]    #S  #[fg=#45475a]│#[fg=#cdd6f4] #{pane_current_path}  "

# Right: your time/date/host, nicer formatting
# (keeps everything on transparent bg)
set -g status-right "#[fg=#45475a]│#[fg=#cdd6f4]  %H:%M #[fg=#45475a]│#[fg=#cdd6f4]  %d-%b #[fg=#45475a]│#[fg=#f5c2e7]  #H  "

##### Quality-of-life #####
# Keep window names stable (optional; comment out if you like auto-renaming)
setw -g automatic-rename off
set -g allow-rename off

# Visual indicator when in copy-mode
setw -g mode-style "bg=default,fg=#fab387,bold"
