-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
99 lines (83 loc) · 3.11 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
#######################
#** General Configs **#
#######################
# have escape being recognized immediately
set -s escape-time 0
# remap modifier key from C-b to C-f
unbind C-b
set-option -g prefix C-f
bind-key C-f send-prefix
# automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
set-option -g history-limit 10000
# Enable mouse mode (tmux >=2.1)
set -g mouse on
# hot reload of this config file
bind r source-file ~/.tmux.conf
# enable vi key bindings for scrolling after mod + pageUp,
# j+k can be used only works for version >= 2.4, though
# (https://stackoverflow.com/questions/51639540/tmux-scroll-mode-vim-keybindings)
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi V send -X select-line
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
####################
#** Key Bindings **#
####################
# bind Pageup (without prefix) to entering scroll mode
# prefix+l scrolls (vim-like) up without the need to
# press Pageup to enter scroll mode
bind -n Pageup copy-mode -u
bind l copy-mode -u
# split panes using | and - instead of " and %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# switch panes using Alt-arrow without prefix
# this assumes that Alt is the meta key
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# cycle through panes with vim-like bindings
bind -T prefix l select-pane -R
bind -T prefix h select-pane -L
bind -T prefix k select-pane -U
bind -T prefix j select-pane -D
##############
#** Design **#
##############
# disable visual bell, etc.
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# modes
setw -g clock-mode-colour colour2
setw -g mode-style fg=colour232,bg=colour130,bold
# panes
# border width cannot be changed since tmux draws
# everything with characters
set -g pane-border-style fg=colour130,bg=default
set -g pane-active-border-style fg=colour130,bg=default
# statusbar
# tmux colors: https://superuser.com/questions/285381/how-does-the-tmux-color-palette-work
# scripts that are called by the statusbar must be executable!
set -g status-style fg=colour137,bg=colour16
set -g status-interval 30
set -g status-position bottom
set -g status-justify left
set -g status-left '#[fg=colour232,bg=colour52] ♥ #(~/bin/bty --short) #[fg=colour52,bg=colour16] '
set -g status-right '#[fg=colour2,bg=colour16] #[fg=colour232,bg=colour2] #S | #(~/bin/tmux_du) | ♫ #(~/bin/tmux_music) | %d/%m/%y | %H:%M '
set -g status-right-length 150
set -g status-left-length 30
setw -g window-status-current-style fg=colour232,bg=colour2,bold
setw -g window-status-current-format ' #I:#W '
setw -g window-status-style fg=colour233,bg=colour238,none
setw -g window-status-format ' #I:#W '
setw -g window-status-bell-style fg=colour255,bg=colour1,bold
# messages
set -g message-style fg=colour232,bg=colour130,bold