set -g display-panes-time 10000
# screen displays error messages for 5 seconds
set -g display-time 5000
set -g history-limit 10000
# screen only waits 5ms to distinguish escape from fkeys
set -g escape-time 5
set -g status-keys vi
set -g editor vim
set -g status-bg blue
set -g status-fg white
set -g message-command-style fg=brightyellow
set -g message-style fg=brightwhite
set -g window-status-current-style 'bg=red fg=brightwhite'
set -g status-left '#[fg=brightcyan]%a %d %b %H:%M '
set -g status-left-length 17
set -g status-right ''
set -g allow-rename on
# screen number command for when a window number exists
set -g command-alias[0] number='swap-window -d -t'
# screen number command for making an entirely new window number
set -g command-alias[1] nnumber='move-window -t'
set -g renumber-windows off
# this is for wsl2
set -g lock-command "rundll32.exe user32.dll,LockWorkStation"

#tmux special
bind u display-popup
setw -g mouse on

#screen keys:

# Set the prefix to ^A.
unbind C-b
set -g prefix C-a
bind a send-prefix

#screen scrollback
bind-key -T copy-mode Escape send-keys -X cancel
unbind k
bind k copy-mode
unbind Escape
bind Escape copy-mode

# Bind appropriate commands similar to screen.
# lockscreen ^X x 
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server

# screen ^C c 
unbind ^C
bind ^C new-window
bind c
bind c new-window

# detach ^D d
unbind ^D
bind ^D detach

# displays * 
unbind *
bind * list-clients

# next ^@ ^N sp n 
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window

# title A
unbind A
bind A command-prompt "rename-window %%"

# other ^A
unbind C-a
bind C-a last-window

# prev ^H ^P p ^? 
unbind C-h
bind C-h previous-window
unbind C-p
bind C-p previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window

# windows ^W w 
unbind C-w
bind C-w list-windows
unbind w
bind w list-windows

# quit \ 
unbind \\
bind \\ confirm-before "kill-server"

# kill K k 
unbind K
bind K confirm-before "kill-window"

# redisplay ^L l 
unbind C-l
bind C-l refresh-client
unbind l
bind l refresh-client

# split -v |
unbind |
bind | split-window

# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-

# " windowlist -b
unbind '"'
bind '"' choose-tree
