nixos-configs/common/home/tmux/default.nix

32 lines
892 B
Nix
Raw Normal View History

2023-11-22 15:33:16 -05:00
{pkgs, ...}: {
2023-10-18 14:54:24 -04:00
programs = {
# Make sure we have color support
bash.shellAliases.tmux = "tmux -2";
2023-10-18 14:54:24 -04:00
tmux = {
enable = true;
mouse = true;
2023-10-18 14:54:24 -04:00
keyMode = "vi";
terminal = "tmux-256color";
2023-10-18 14:54:24 -04:00
newSession = true;
historyLimit = 30000;
plugins = builtins.attrValues {
inherit (pkgs.tmuxPlugins) dracula;
};
2023-10-18 14:54:24 -04:00
extraConfig =
2024-06-09 22:49:30 -04:00
# bash
''
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
set -ga terminal-overrides ",*256col*:Tc"
'';
2023-10-18 14:54:24 -04:00
};
};
}