Instantly share code, notes, and snippets.

@lemoinem /.tmux.conf
Last active Dec 17, 2015

Embed
What would you like to do?
tmux-everywhere
# Make it use M-f, compatible with both emacs, screen and most console interactive applications...
bind-key M-f last-window
bind-key f send-prefix
set -g prefix M-f
# New window on M-f M-c
bind-key M-c new-window
# Reload key
bind r source-file ~/.tmux.conf
set -g default-terminal "screen-256color"
set -g history-limit 1000
set -g visual-bell off
set -wg utf8 on
set-option -g status-utf8 on
# THEME
set -g status-bg black
set -g default-terminal "screen-256color"
set -g status-fg white
set -g status-interval 10
set -g status-left-length 30
set -wg window-status-format '#I#F#W'
set -wg xterm-keys
set -wg window-status-current-format '#[fg=red](#[default]#I#F#W#[fg=red])#[default]'
set -g status-left '#[fg=colour44][#(whoami)@#H]#[default]'
set -g status-right '#[fg=colour44]%a %Y-%m-%d %R#[default]'
if [ -z "$TMUX" ] && [ "$TERM" = "rxvt-unicode-256color" -o "$TERM" = "linux" -o "$TERM" = "rxvt-unicode" -o "$TERM" = "xterm" -o "$SSH_TTY" = "$(tty)" -o "$(\ps --no-headers -o comm $PPID)" == "mosh-server" ]
then
export TERM="xterm-256color"
if which tmux > /dev/null
then
tmux attach
elif which screen > /dev/null
then
screen -xRR
else
touch .no-screen
fi
if [ -f ~/.no-screen ]
then
rm ~/.no-screen
else
exit
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment