36 lines
955 B
Nix
36 lines
955 B
Nix
|
|
{ pkgs, lib, ... }:
|
||
|
|
|
||
|
|
{
|
||
|
|
home.packages = with pkgs; [
|
||
|
|
tmux
|
||
|
|
];
|
||
|
|
programs.tmux = {
|
||
|
|
enable = true;
|
||
|
|
shortcut = "a";
|
||
|
|
# aggressiveResize = true; -- Disabled to be iTerm-friendly
|
||
|
|
baseIndex = 1;
|
||
|
|
newSession = true;
|
||
|
|
# Stop tmux+escape craziness.
|
||
|
|
escapeTime = 0;
|
||
|
|
# Force tmux to use /tmp for sockets (WSL2 compat)
|
||
|
|
secureSocket = false;
|
||
|
|
|
||
|
|
plugins = with pkgs; [
|
||
|
|
tmuxPlugins.better-mouse-mode
|
||
|
|
];
|
||
|
|
|
||
|
|
extraConfig = ''
|
||
|
|
set -g default-terminal "xterm-256color"
|
||
|
|
set -ga terminal-overrides ",*256col*:Tc"
|
||
|
|
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
||
|
|
set-environment -g COLORTERM "truecolor"
|
||
|
|
|
||
|
|
# Mouse works as expected
|
||
|
|
set-option -g mouse on
|
||
|
|
# easy-to-remember split pane commands
|
||
|
|
bind | split-window -h -c "#{pane_current_path}"
|
||
|
|
bind - split-window -v -c "#{pane_current_path}"
|
||
|
|
bind c new-window -c "#{pane_current_path}"
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
}
|