# true color for my neovim! :)
set-option -sa terminal-features ',xterm-256color:RGB'
set-option -sa terminal-features ',alacritty:RGB'
set-option -sa terminal-features ',kitty:RGB'

# escape time. Also neovim :)
set-option -sg escape-time 10
set-option -g focus-events on

#move status line to top of screen
set-option -g status-position top

set-option -g status-left ""
set-option -g status-style bg=darkgreen
set-option -g status-right ""

# Change inactive window color:
set -g window-status-style bg=darkgreen,fg=brightwhite
# Change active window color:
set -g window-status-current-style bg=green,fg=brightwhite,bold

# Increase scroll history by 3X. default is 2K-ish.
set -g history-limit 6000
# I hate meeces to pieces but scrolling is nice :)
set -g mouse on

# Ctrl-b is a lousy prefix. Folks seem to like Ctrl-a
unbind C-b
set-option -g prefix C-a

# Switch back to nvim
bind-key -r G run-shell "$HOME/.local/share/nvim/lazy/harpoon/scripts/tmux/switch-back-to-nvim"

# if we're using poetry shell, the tab wont read nvim. Fix that.
bind-key C-n renamew 'nvim'


bind-key 1 select-window -t 1
bind-key 2 select-window -t 2
bind-key 3 select-window -t 3
bind-key 4 select-window -t 4
bind-key 5 select-window -t 5
bind-key 6 select-window -t 6
bind-key 7 select-window -t 7
bind-key 8 select-window -t 8
bind-key 9 select-window -t 9

bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'

bind-key C-u run "tmux popup -E -b double -w 100% -h 100% \
                  sh -c 'tmux capture-pane -Jp | urlscan -d' "


# Blind as a bat. Make the message stay for a bit!
set-option -g display-time 4000

# Allow passthrough of images
set -gq allow-passthrough on
