# tmux starts a login shell by default, which may result in multiple negative side effects:
#
# Users of fortune may notice that quotes are printed when creating a new
# panel.
#
# The configuration files for login shells such as ~/.profile are interpreted
# each time a new panel is created, so commands intended to be run on session
# initialization (e.g. setting audio level) are executed.
#
# To disable this behaviour:
set -g default-command "${SHELL}"

set -g default-terminal "screen-256color"

set -g status-bg white
set -g status-fg black
set-window-option -g window-status-current-style fg=black,bg=green,bright

# to simulate a bell alert use: sleep 3 && echo -e "\a"
set-window-option -g window-status-bell-style 'fg=black,bg=red,bright'

bind-key -T copy-mode 'M-w' send-keys -X copy-pipe-and-cancel "xcopy"
bind-key -T prefix ']' run "xpaste | tmux load-buffer - ; tmux paste-buffer"
bind-key -T prefix 'x' kill-pane
bind-key -T prefix 'X' kill-session

# clear screen and scrollback history
bind-key -n C-l send-keys C-l \; run 'tmux clear-history'

run-shell ~/.tmux.conf.d/copycat/copycat.tmux
run-shell ~/.tmux.conf.d/open/open.tmux
run-shell ~/.tmux.conf.d/logging/logging.tmux
run-shell ~/.tmux.conf.d/tmux-fingers/tmux-fingers.tmux

set -g visual-activity on
setw -g monitor-activity on
setw -g window-status-activity-style fg=black,bg=yellow,bright

set -g status on

set-option -g set-titles on

set -g mouse on
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
# set -g mouse-utf8 off

bind -n S-Right next-window
bind -n S-Left previous-window

bind t source-file ~/.tmux.conf
