mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-30 01:24:57 +08:00
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ pkgs, ... }:
|
|
{
|
|
programs.tmux = {
|
|
enable = true;
|
|
shell = "${pkgs.bash}/bin/bash";
|
|
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;
|
|
mouse = true;
|
|
clock24 = true;
|
|
historyLimit = 50000;
|
|
|
|
plugins = with pkgs; [
|
|
tmuxPlugins.better-mouse-mode
|
|
];
|
|
|
|
extraConfig = ''
|
|
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
|
|
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"
|
|
|
|
# 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}"
|
|
'';
|
|
};
|
|
|
|
programs.tmate = {
|
|
enable = true;
|
|
# FIXME: This causes tmate to hang.
|
|
# extraConfig = config.xdg.configFile."tmux/tmux.conf".text;
|
|
};
|
|
}
|