-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
66 lines (48 loc) · 2.24 KB
/
tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Change the prefix key.
set -g prefix C-j
unbind C-b
# Lower the timeout, as suggested in https://github.com/neovim/neovim/wiki/FAQ
set -g escape-time 100
# For "autoread" in neovim
set-option -g focus-events on
# No idea. Just copied from Neovim's :checkhealth recommendations.
set-option -sa terminal-overrides ',xterm-256color:RGB'
# Reload configuration.
bind r source-file ~/.tmux.conf
bind C-j send-prefix
bind y copy-mode
bind P paste-buffer
set -g default-terminal "screen-256color"
set -g history-limit 5000
# Awesome. Tmux devs broke compatibility of the default-path setting between 1.8
# and 1.9. Check for 1.6 (the one in Debian Wheezy) to use the setting, and
# later on consider >=1.9 to workaround the lack of the setting. like in the
# commented out snippets.
if-shell 'test \( "$(tmux -V)" = "tmux 1.6" \)' \
'set -g default-path $HOME'
# Likewise for the version in Ubuntu 14.04, because I'm lazy, I hate the shell,
# and I'm so not going to make version comparison in a stringly typed lang.
if-shell 'test \( "$(tmux -V)" = "tmux 1.8" \)' \
'set -g default-path $HOME'
# This snippets where found in the powerline repository. Unfortunately, seems a
# fragile test, since in a new version the authors can as well print just the
# version number. :-(
# run-shell "tmux set-environment -g TMUX_VERSION_MAJOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g')"
# run-shell "tmux set-environment -g TMUX_VERSION_MINOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f2 | sed 's/[^0-9]*//g')""' )' )"
# if-shell '[ $TMUX_VERSION_MAJOR -gt 1 -o \( $TMUX_VERSION_MAJOR -eq 1 -a $TMUX_VERSION_MINOR -ge 8 \) ]' \
# 'set -g default-path $HOME'
# if-shell '[ $TMUX_VERSION_MAJOR -gt 1 -o \( $TMUX_VERSION_MAJOR -eq 1 -a $TMUX_VERSION_MINOR -ge 9 \) ]' \
# do something else... Like restoring behaviour like in:
# https://coderwall.com/p/tjo3ig
# Colors and stuff.
set -g status-fg white
set -g status-bg black
# Pre v 3.0a
# setw -g window-status-fg cyan
# setw -g window-status-bg default
# setw -g window-status-attr dim
# setw -g window-status-current-fg white
# setw -g window-status-current-bg red
# setw -g window-status-current-attr bright
setw -g window-status-style fg=cyan,bg=default,dim
setw -g window-status-current-style fg=white,bg=red,bright