-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.nix
53 lines (52 loc) · 1.29 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
{
pkgs,
isDarwin,
...
}: {
programs.tmux = {
enable = true;
aggressiveResize = true;
baseIndex = 1;
clock24 = true;
escapeTime = 0;
historyLimit = 100000;
keyMode = "vi";
sensibleOnTop = true;
shortcut = "s";
terminal = "screen-256color";
shell = "${pkgs.fish}/bin/fish";
secureSocket = true;
plugins = with pkgs; [
{
plugin = tmuxPlugins.resurrect;
extraConfig = ''
set -g @resurrect-save 'W'
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
'';
}
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-restore 'on'
'';
}
tmuxPlugins.open
tmuxPlugins.fzf-tmux-url
];
extraConfig = with pkgs; let
commonFiles = with builtins; [
(readFile ./tmux/tmux.conf)
];
darwinFiles = lib.optionals isDarwin [
(builtins.readFile ./tmux/tmux-osx.conf)
];
# these require access to the pkgs attribute set, so place them here
customLines = [
''
bind-key a popup -Ed $PWD ${pkgs.listprojects}/bin/listprojects
''
];
in (builtins.concatStringsSep "\n" (commonFiles ++ darwinFiles ++ customLines));
};
}