tmux: better ssh support + add tmuxifier to tmux.conf

This commit is contained in:
Henrik Lissner 2015-12-23 02:20:12 -05:00
parent db8a39e8b6
commit 7bdff15f80
3 changed files with 19 additions and 14 deletions

View file

@ -1,5 +1,5 @@
## Behavior ###############
####
run-shell "~/.dotfiles/tmux/conf.sh"
# utf-8
@ -48,7 +48,7 @@ bind - join-pane
# reload config without killing server
bind r source-file ~/.tmux.conf \; display-message " Config reloaded..".
bind R refresh-client
bind ^r refresh-client
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
@ -121,13 +121,15 @@ setw -g window-status-activity-attr bold,blink
setw -g window-status-activity-bg colour236
setw -g window-status-activity-fg white
set -g status-interval 60
set -g status-interval 30
set -g status-justify left
set -g status-right-length 100
set -g status-left-length 80
set -g status-left "#{prefix_highlight}#(~/.dotfiles/tmux/conf-status.sh left) "
set -g status-left "#(~/.dotfiles/tmux/conf-status.sh left) "
set -g status-right "#(~/.dotfiles/tmux/conf-status.sh right) "
set -g window-status-format " #I #W:#T "
set -g window-status-current-format " #W:#T "
set -g window-status-current-format " #W:#T "
####
run-shell "~/.dotfiles/tmux/prefix_highlight.tmux"

View file

@ -25,14 +25,14 @@ else
fi
STATUS="$DELIM<<$RESET"
if command -v 'tmux-mem-cpu-load' >/dev/null; then
STATUS+=$SYSINFO
command -v 'tmux-mem-cpu-load' >/dev/null && STATUS+=' '$(tmux-mem-cpu-load -i 5)
STATUS+=' '$(tmux-mem-cpu-load -i 15)
STATUS+=$RESET
fi
STATUS+="$DELIM < $RESET"
STATUS+=$IP
STATUS+=$(dig +short myip.opendns.com @208.67.222.222)
STATUS+=' '$RESET$HOST' '
STATUS+=$HOSTNAME
STATUS+=$IP$(dig +short myip.opendns.com @208.67.222.222)" $RESET"
STATUS+=$HOST' '$HOSTNAME' '
fi
echo $STATUS

View file

@ -40,11 +40,10 @@ else
fi
# If in ssh, use default C-b prefix
if [[ -z "$SSH_CONNECTON" ]]
if [[ -z "$SSH_CONNECTION" ]]
then
# Remap the key prefix
tmux set -g prefix ^c
tmux unbind C-b
# Restore sigterm C-c
tmux bind C-c send-prefix
@ -54,9 +53,13 @@ then
tmux set -g pane-active-border-fg yellow
tmux set -g pane-border-fg colour238
else
# Remap the key prefix
tmux set -g prefix ^a
tmux set -g status-bg yellow
tmux set -g status-fg black
tmux set -g pane-active-border-fg blue
tmux set -g pane-border-fg colour237
fi
tmux unbind C-b