about summary refs log tree commit diff
path: root/home/tmux/default.nix
blob: a30bd283993772ef7d03af635a894c375d802201 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ config, lib, pkgs, ... }:
let cfg = config.my.home.tmux;
in
{
  options.my.home.tmux = with lib; {
    enable = mkEnableOption "tmux terminal multiplexer";
  };

  config.programs.tmux = lib.mkIf cfg.enable {
    enable = true;

    terminal = "xterm-256color";
    escapeTime = 0;
    aggressiveResize = true;
    baseIndex = 1;
    shortcut = "z";
    clock24 = true;
    historyLimit = 50000; # Bigger buffer

    extraConfig = ''
      setw -g mouse on

      set-option -g renumber-windows on
    '';
  };
}