{ config, pkgs, ... }: {
  programs.tmux = {
    enable = true;
    baseIndex = 1;
    escapeTime = 0;
    historyLimit = 10000;
    mouse = true;
    keyMode = "vi"; # Optional: sets vi mode for copy/paste
    shortcut = "Space"; # Sets Prefix to Ctrl+Space
    plugins = with pkgs; [
      tmuxPlugins.sensible
      tmuxPlugins.yank
    ];
    extraConfig = ''
      set -g renumber-windows on
      set -g detach-on-destroy off
      set -g set-clipboard on
      unbind r
      bind r source-file ~/.config/tmux/tmux.conf
      bind h split-window -v -c "#{pane_current_path}"
      bind v split-window -h -c "#{pane_current_path}"
      bind X confirm-before -p "Kill session #S (y/n)" kill-session
      set -g status-position top
      set -g status-style "bg=default"
      set -g status-justify "absolute-centre"
      setw -g pane-border-status top
      setw -g pane-border-format " " 
      setw -g pane-active-border-style "bg=default, fg=#E0E0E0"
      setw -g pane-border-style "bg=default, fg=#E0E0E0"
      setw -g pane-border-lines single
      set -g window-status-current-format ""
      set -g window-status-format ""
      set -g window-status-separator ""
      set -g status-left-length 100
      set -g status-left "#{?client_prefix,#[fg=#CC0000]  #S ,#[fg=#CCCC00]  #S, #[fg=#66CC00]  #S }"
      set -ga status-left "#[bg=default,fg=#e0e0e0,none]│"
      set -ga status-left "#[bg=default,fg=#e0e0e0]  #{pane_current_command} "
      set -ga status-left "#[bg=default,fg=#e0e0e0,none]│"
      set -ga status-left "#[bg=default,fg=#0080ff]  #{=/-32/...:#{s|/home/$USER|~|:pane_current_path}} "
      set -g status-right ""
      set -g status-right-length 0
    '';
  };
}
