blob: 8ac1c743a005f72f1430e8c68499317c48e9205c (
plain)
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
|
{ pkgs, ... }:
{
programs.tmux = {
enable = true;
package = pkgs.tmux;
terminal = "tmux-256color";
escapeTime = 0;
baseIndex = 0;
historyLimit = 10000;
mouse = true;
clock24 = true;
secureSocket = true;
aggressiveResize = true;
prefix = "C-t";
extraConfig = ''
# Prevent detaching from tmux when closing a session.
set -g detach-on-destroy off
# Kill the current session.
bind X kill-session
# Splitting panes.
unbind v
unbind h
unbind %
unbind '"'
bind v split-window -h -c "#{pane_current_path}" # split vertically
bind h split-window -v -c "#{pane_current_path}" # split horizontally
# Navigating panes.
bind ^ last-window
bind C-h select-pane -L
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
# Copy mode movements.
set-window-option -g mode-keys vi
unbind -T copy-mode-vi Space;
unbind -T copy-mode-vi Enter;
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
# Customizing status bar.
set -g status-position bottom
set -g status-style "bg=#050505 fg=#C5C8C6"
set -g status-right ""
setw -g window-status-current-format " #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F"
setw -g window-status-format " #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F"
'';
};
}
|