-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.nix
83 lines (65 loc) · 2.03 KB
/
tmux.nix
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
{
pkgs,
isServer,
...
}: {
programs.tmux = {
enable = true;
shell = "${pkgs.fish}/bin/fish";
prefix =
if isServer
then "C-r"
else "C-t";
keyMode = "vi";
mouse = true;
escapeTime = 0;
historyLimit = 100000;
terminal = "xterm-256color";
clock24 = true;
extraConfig = ''
# Per https://github.com/nix-community/home-manager/issues/5952#issuecomment-2409056750.
set -gu default-command
set -g default-shell "$SHELL"
${
if isServer
then ""
else "setw -g monitor-activity on"
}
bind c new-window -c "#{pane_current_path}"
bind m set monitor-activity
bind S setw synchronize-panes
bind -n S-Left select-pane -L
bind -n S-Right select-pane -R
bind -n S-Up select-pane -U
bind -n S-Down select-pane -D
bind -n M-S-Left previous-window
bind -n M-S-Right next-window
set -g status-left ' #[fg=black,bold]#h #S#[default] '
set -g status-left-length 20
set -g status-bg ${
if isServer
then "red"
else "blue"
}
set -g status-right ' #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default] '
# pane border
set-option -g pane-border-style fg=colour235 #base02
set-option -g pane-active-border-style fg=colour240 #base01
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# default statusbar colors
set-option -g status-style fg=black,bg=default,default
# default window title colors
set-window-option -g window-status-style fg=black,bg=default
# active window title colors
set-window-option -g window-status-current-style fg=black,bg=default,bright
# command/message line colors
set-option -g message-style fg=black,bg=white,bright
set -g status-left-length 32
set -g status-right-length 150
'';
};
}