aboutsummaryrefslogtreecommitdiff
path: root/modules/homeModules/tmux.nix
blob: 97f85dc0f16f6a15bf37f0940158597d4b3a40eb (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{inputs, ...}: {
  flake.homeModules.tmux = {
    pkgs,
    lib,
    config,
    ...
  }: {
    options.customs = {
      tmux.enable = lib.mkEnableOption "enable tmux config";
    };

    config = lib.mkIf config.customs.tmux.enable {
      stylix.targets.tmux.enable = true;
      home.packages = with pkgs; [
        fzf
      ];
      programs.tmux = {
        enable = true;
        prefix = "C-x";
        baseIndex = 1;
        historyLimit = 10000;
        extraConfig = ''
          set -g mode-keys vi
          set -g default-terminal "''${TERM}"
          set -sg terminal-overrides ",*:RGB"

          set -g pane-border-lines simple

          set -g escape-time 0
          set -g renumber-windows on

          set -g status-style bg=default,fg=black,bright
          set -g status-left ""
          set -g window-status-format " #W "
          set -g window-status-current-format " #W "

          set -g window-status-bell-style "bg=red,nobold"
          set -g window-status-current-style \
              "#{?window_zoomed_flag,bg=yellow,bg=green,nobold}"

          bind j next-window
          bind k previous-window
        '';
        plugins = with pkgs.tmuxPlugins; [
          tmux-fzf
        ];
      };
    };
  };
}