kdmorris revised this gist . Go to revision
1 file changed, 57 insertions, 15 deletions
tmux.nix
| @@ -14,18 +14,60 @@ | |||
| 14 | 14 | historyLimit = 5000; | |
| 15 | 15 | ||
| 16 | 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 | - | }; | |
| 17 | + | extraConfig = | |
| 18 | + | let | |
| 19 | + | binds = [ | |
| 20 | + | { | |
| 21 | + | key = "|"; | |
| 22 | + | options = ""; | |
| 23 | + | command = "split-window -h"; | |
| 24 | + | } | |
| 25 | + | { | |
| 26 | + | key = "-"; | |
| 27 | + | options = ""; | |
| 28 | + | command = "split-window -v"; | |
| 29 | + | } | |
| 30 | + | { | |
| 31 | + | key = "h"; | |
| 32 | + | options = "-r"; | |
| 33 | + | command = "resize-pane -L 5"; | |
| 34 | + | } | |
| 35 | + | { | |
| 36 | + | key = "j"; | |
| 37 | + | options = "-r"; | |
| 38 | + | command = "resize-pane -D 5"; | |
| 39 | + | } | |
| 40 | + | { | |
| 41 | + | key = "k"; | |
| 42 | + | options = "-r"; | |
| 43 | + | command = "resize-pane -U 5"; | |
| 44 | + | } | |
| 45 | + | { | |
| 46 | + | key = "l"; | |
| 47 | + | options = "-r"; | |
| 48 | + | command = "resize-pane -R 5"; | |
| 49 | + | } | |
| 50 | + | { | |
| 51 | + | key = "m"; | |
| 52 | + | options = "-r"; | |
| 53 | + | command = "resize-pane -Z"; | |
| 54 | + | } | |
| 55 | + | ]; | |
| 56 | + | ||
| 57 | + | unbinds = [ | |
| 58 | + | "%" | |
| 59 | + | "\"" | |
| 60 | + | ]; | |
| 61 | + | ||
| 62 | + | bindKey = [ | |
| 63 | + | "-T copy-mode-vi 'v' send -X begin-selection" | |
| 64 | + | "-T copy-mode-vi 'y' send -X copy-selection" | |
| 65 | + | ]; | |
| 66 | + | ||
| 67 | + | bindConfig = | |
| 68 | + | lib.lists.forEach binds (i: "bind ${i.key} ${i.options} ${i.command}") | |
| 69 | + | ++ lib.lists.forEach unbinds (i: "unbind ${i}") | |
| 70 | + | ++ lib.lists.forEach bindKey (i: "bind-key ${i}"); | |
| 71 | + | in | |
| 72 | + | lib.concatLines bindConfig; | |
| 73 | + | }; | |
kdmorris revised this gist . Go to revision
1 file changed, 31 insertions
tmux.nix(file created)
| @@ -0,0 +1,31 @@ | |||
| 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 | + | }; | |