aboutsummaryrefslogtreecommitdiffhomepage
path: root/home-manager/home.nix
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-06-18 21:49:04 +0900
committernsfisis <nsfisis@gmail.com>2023-09-01 09:25:39 +0900
commitf1e3ca6f971c2c5177174896e1fa3e6f695ca2a1 (patch)
treeb31e333930788d70b95869d20a29fef39c0faa35 /home-manager/home.nix
parent22ddc1d4c1a06694997459f699818f20f2286798 (diff)
downloaddotfiles-f1e3ca6f971c2c5177174896e1fa3e6f695ca2a1.tar.gz
dotfiles-f1e3ca6f971c2c5177174896e1fa3e6f695ca2a1.tar.zst
dotfiles-f1e3ca6f971c2c5177174896e1fa3e6f695ca2a1.zip
home-manager: manage tmux
Diffstat (limited to 'home-manager/home.nix')
-rw-r--r--home-manager/home.nix30
1 files changed, 30 insertions, 0 deletions
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
+ );
+ };
}