From f1e3ca6f971c2c5177174896e1fa3e6f695ca2a1 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 18 Jun 2023 21:49:04 +0900 Subject: home-manager: manage tmux --- home-manager/home.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'home-manager/home.nix') diff --git a/home-manager/home.nix b/home-manager/home.nix index c24fb0a..ddbcac9 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -53,4 +53,34 @@ in enable = true; nix-direnv.enable = true; }; + + programs.tmux = { + enable = true; + + sensibleOnTop = false; + + aggressiveResize = true; + baseIndex = 1; + clock24 = true; + escapeTime = 0; + historyLimit = 50000; + mouse = false; + prefix = "C-t"; + terminal = "tmux-256color"; + + extraConfig = ( + let + commonConfig = builtins.readFile ./config/tmux/tmux.conf; + extraConfig = if isWayland then + '' + bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy" + '' + else + '' + bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" + ''; + in + commonConfig + extraConfig + ); + }; } -- cgit v1.2.3-70-g09d2