-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.tmux.conf
106 lines (82 loc) · 3.17 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
96
97
98
99
100
101
102
103
104
105
106
# set prefix key to F9, which is remapped to Caps Lock
unbind-key C-b
set -g prefix 'C-z'
bind-key 'C-z' send-prefix
# fix clear bug at tty
set -as terminal-overrides ',*:indn@'
# always try to resize
set-window-option -g aggressive-resize
# set-titles
set-option -g set-titles on
# #S covers session name; #T is the status
set -g set-titles-string '[#S] #T'
# set tmux style for keybindings (vim keybindings sucks, sorry)
set -g mode-keys emacs
set -g status-keys emacs
# join
bind-key j join-pane -s !
# add true color support for tmux (but only for them that has xterm set)
# on console mode (without X) i got TERM=screen, but
# xfce4-terminal -> TERM=xterm-256colors
# xterm/uxterm -> TERM=xterm
if-shell '[[ $TERM == *xterm* ]] && true || false' \
'set -g default-terminal "xterm-256color"'
# auto-renumbering on delete windows
set-option -g renumber-windows on
# set bg to blue because I like mega man X
set -g status-bg blue
# status bar - {
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
# set -g status-attr dim
set -g status-left ''
set -g status-right '#{prefix_highlight}#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S'
set -g status-right-length 50
set -g status-left-length 20
# status-interval to update clock at each second
set -g status-interval 1
#setw -g window-status-current-fg colour81
#setw -g window-status-current-bg colour238
#setw -g window-status-current-attr bold
# TODO: be better add the #S (session) one one place here
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
#setw -g window-status-fg colour138
#setw -g window-status-bg colour235
#setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
# setw -g window-status-bell-attr bold
# setw -g window-status-bell-fg colour255
# setw -g window-status-bell-bg colour1
# status bar - }
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# MOUSE INTEGRATION
# partially stole from:
# https://gist.github.com/paulodeleo/5594773
set -g mouse on
# Scroll History
set -g history-limit 50000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
# set default path for creating new panes/window
bind c new-window -c "#{pane_current_path}"
# Saner splitting.
bind v split-window -c "#{pane_current_path}" -h
bind s split-window -c "#{pane_current_path}" -v # this overwrite the session
bind S choose-session
bind y paste-buffer
# Saner splitting.
bind '"' split-window -c "#{pane_current_path}" -v
bind % split-window -c "#{pane_current_path}" -h
# Autorename sanely.
setw -g automatic-rename on
# log
bind "C-l" command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'