aboutsummaryrefslogtreecommitdiff
path: root/home-manager/homeModules/tmux.nix
blob: 7d7447908d18033e69f72831fbace65716c0773c (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
{ pkgs, lib, config, ... }:

{
  options = {
    tmux.enable = lib.mkEnableOption "enable tmux config";
  };

  config = lib.mkIf config.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
      ];
    };
  };
}