-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
95 lines (67 loc) · 2.76 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# improve colors
set -g default-terminal 'screen-256color'
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigato
#is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
#bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
#bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
#bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
#bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
#bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind c new-window -c '#{pane_current_path}'
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
bind-key b break-pane -d
set -g prefix2 C-a
# Vim keybinding displaying
# set-option -g status-keys 'vim'
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# soften status bar color from harsh green to light gray
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
# remove administrative debris (session name, hostname, time) in status bar
set -g status-left ''
set -g status-left-length 50
set -g status-right '#{battery_status_bg} Batt: #{battery_icon} #{battery_percentage} #{battery_remain} | Date: %a %h-%d %H:%M'
# increase scrollback lines
set -g history-limit 10000
# prefix -> back-one-character
bind-key C-b send-prefix
# prefix-2 -> forward-incremental-history-search
bind-key C-s send-prefix -2
set-window-option -g window-status-current-bg blue
# Todolist and htop binding
# Quickly view system & process info in htop
#bind-key h split-window -h "htop"
# Quickly edit todo list
bind-key t split-window -h "vim ~/Documents/tasks.md"
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
# Reload tmux manually
bind-key r source-file ~/.tmux.conf \; display-message "Nouvelle configuration chargée"
# Mouse management and scrolling
# set-window-option -g mouse on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
run '~/.tmux/plugins/tmux-battery/battery.tmux'
run '~/.tmux/plugins/tmux-yank/yank.tmux'