bind-key space next-window
bind-key C-space next-window
bind-key K confirm-before kill-pane
-bind-key \ confirm-before kill-session
+bind-key '\' confirm-before kill-session
#bind-key C-h previous-window
### join the last active pane to the currently active window
bind-key j join-pane -s !
+### join the marked pane to the currently active window
+### ('bind-key m select-pane -m' is default to mark the current pane)
+bind-key J join-pane
+
+### Move current window to session named "bg" (and create session if it does not exist)
+bind-key B if-shell "! tmux has-session -t bg" "new-session -d -s bg" \; move-window -t bg
+
+### Reload Config
+if-shell "! (env | grep -q TMUX=/tmp/tmate)" \
+ "bind-key R source-file ~/.tmux.conf \\; source-file -q ~/.tmux.conf.local \\; display-message '~/.tmux.conf[.local] reloaded'"
+
###rebind keys
bind-key h next-layout
-bind-key ^? previous-window
-bind-key ^H previous-window
+bind-key BSpace previous-window
+
bind-key tab select-pane -t :.+
### useful custom keybindings
bind-key | command-prompt -p "exec:" "split-window -h '%%'"
set -s escape-time 0
set -g default-terminal "screen-256color"
set -g display-panes-time 3000
-set -g mouse-select-pane off
set -g visual-activity on
set -g mode-keys vi
### set status line appearance
-set -g status-utf8 on
-set -g status-fg white
-set -g status-bg black
+set -g status-style fg=white,bg=black
set -g status-left-length 28
### status-left: @hostname:sessionname
#set -g status-right-length 6
#set -g status-right "#[fg=yellow]%H:%M"
-set-window-option -g window-status-fg blue
-set-window-option -g window-status-bg black
-set-window-option -g window-status-current-attr bold
+set-window-option -g window-status-style fg=blue,bg=black
+set-window-option -g window-status-current-style bold
+### source user-specific local configuration file
+if-shell "! (env | grep -q TMUX=/tmp/tmate)" \
+ "source-file -q ~/.tmux.conf.local"