tmux.nix
· 923 B · Nix
Raw
programs.tmux = {
enable = true;
shortcut = "a";
plugins = with pkgs.tmuxPlugins; [ vim-tmux-navigator ];
terminal = "screen-256color";
baseIndex = 1;
keyMode = "vi";
mouse = true;
aggressiveResize = false;
clock24 = true;
escapeTime = 500;
historyLimit = 5000;
sensibleOnTop = false;
extraConfig = let
binds = [
{ key = "|", command = "split-window -h" }
{ key = "-", command = "split-window -v" }
{ key = "h", options = "-r", command = "resize-pane -L 5" }
{ key = "j", options = "-r", command = "resize-pane -D 5"}
{ key = "k", options = "-r", command = "resize-pane -U 5"}
{ key = "l", options = "-r", command = "resize-pane -R 5"}
{ key = "m", options = "-r", command = "resize-pane -Z"}
];
in
''
${lists.forEach binds (i: "bind ${i.key} ${i.options} ${i.command}")}
'';
};
| 1 | programs.tmux = { |
| 2 | enable = true; |
| 3 | shortcut = "a"; |
| 4 | |
| 5 | plugins = with pkgs.tmuxPlugins; [ vim-tmux-navigator ]; |
| 6 | |
| 7 | terminal = "screen-256color"; |
| 8 | baseIndex = 1; |
| 9 | keyMode = "vi"; |
| 10 | mouse = true; |
| 11 | aggressiveResize = false; |
| 12 | clock24 = true; |
| 13 | escapeTime = 500; |
| 14 | historyLimit = 5000; |
| 15 | |
| 16 | sensibleOnTop = false; |
| 17 | extraConfig = let |
| 18 | binds = [ |
| 19 | { key = "|", command = "split-window -h" } |
| 20 | { key = "-", command = "split-window -v" } |
| 21 | { key = "h", options = "-r", command = "resize-pane -L 5" } |
| 22 | { key = "j", options = "-r", command = "resize-pane -D 5"} |
| 23 | { key = "k", options = "-r", command = "resize-pane -U 5"} |
| 24 | { key = "l", options = "-r", command = "resize-pane -R 5"} |
| 25 | { key = "m", options = "-r", command = "resize-pane -Z"} |
| 26 | ]; |
| 27 | in |
| 28 | '' |
| 29 | ${lists.forEach binds (i: "bind ${i.key} ${i.options} ${i.command}")} |
| 30 | ''; |
| 31 | }; |