mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 00:59:44 +01:00
a1162e04b3
Previously, it was not possible to set an arbitrary tmux prefix since CTRL was hardcoded in the module. To avoid breaking existing configs, a new option was implemented that conveniently uses the tmux terminology but defaults to null and does not affect previous behavior when set to null. The behavior for the shortcut option was not completely replicated, i.e., it does not bind "b" to send-prefix but stick to the default of the prefix binding sending prefix (C-b C-b instead of C-b b) and it does not bind repetition of the prefix (C-b C-b) to `last-window`, both of these bring the option closer to the default tmux configuration. Fixes #1237
27 lines
519 B
Nix
27 lines
519 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
programs.tmux = {
|
|
enable = true;
|
|
shortcut = "a";
|
|
prefix = null;
|
|
};
|
|
|
|
nixpkgs.overlays = [
|
|
(self: super: {
|
|
tmuxPlugins = super.tmuxPlugins // {
|
|
sensible = super.tmuxPlugins.sensible // { rtp = "@sensible_rtp@"; };
|
|
};
|
|
})
|
|
];
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.tmux.conf
|
|
assertFileContent home-files/.tmux.conf \
|
|
${./shortcut-without-prefix.conf}
|
|
'';
|
|
};
|
|
}
|