<commit_before>{ pkgs, ... }:

{
  programs.tmux = {
    enable = true;
    clock24 = true; # use 24 hour clock
    escapeTime = 0;
    terminal = "tmux-256color";
    sensibleOnTop = false; # do not inject other configuration
    extraConfig = ''
      # do not allow tmux to rename windows
      set -g allow-rename off

      # set scrollback history to 10000 (10k)
      set -g history-limit 10000

      # reload ~/.tmux.conf using PREFIX r
      bind r source-file ~/.tmux.conf \; display "Reloaded!"

      # Enable mouse mode (tmux 2.1 and above)
      set -g mouse on

      # ----------------------
      # Status Bar
      # -----------------------
      set-option -g status on                # turn the status bar on
      set -g status-interval 5               # set update frequencey (default 15 seconds)
      set -g status-justify centre           # center window list for clarity

      # visual notification of activity in other windows
      setw -g monitor-activity on
      set -g visual-activity on

      # better tmux/vim navigation
      bind -n M-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-h) || tmux select-pane -L"
      bind -n M-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-j) || tmux select-pane -D"
      bind -n M-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-k) || tmux select-pane -U"
      bind -n M-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-l) || tmux select-pane -R"
      bind -n M-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'M-\\') || tmux select-pane -l"

      # open a new split or window in the current directory
      bind '"' split-window -c "#{pane_current_path}"
      bind % split-window -h -c "#{pane_current_path}"
      bind c new-window -c "#{pane_current_path}"

      # ----------------------
      # gruvbox colors
      # -----------------------
      # There is a gruvbox tmux plugin [1] but it mingles the formatting and
      # content of the status bars. I intend to try and fix this, but am
      # putting things inline for now.
      #
      # [1] https://github.com/egel/tmux-gruvbox
      #

      ## COLORSCHEME: gruvbox dark
      set-option -g status "on"

      # default statusbar color
      set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1

      # default window title colors
      set-window-option -g window-status-style bg=colour214,fg=colour237 # bg=yellow, fg=bg1
<commit_msg>Cut unused tmux binding.<commit_after>{ pkgs, ... }:

{
  programs.tmux = {
    enable = true;
    clock24 = true; # use 24 hour clock
    escapeTime = 0;
    terminal = "tmux-256color";
    sensibleOnTop = false; # do not inject other configuration
    extraConfig = ''
      # do not allow tmux to rename windows
      set -g allow-rename off

      # set scrollback history to 10000 (10k)
      set -g history-limit 10000

      # reload ~/.tmux.conf using PREFIX r
      bind r source-file ~/.tmux.conf \; display "Reloaded!"

      # Enable mouse mode (tmux 2.1 and above)
      set -g mouse on

      # ----------------------
      # Status Bar
      # -----------------------
      set-option -g status on                # turn the status bar on
      set -g status-interval 5               # set update frequencey (default 15 seconds)
      set -g status-justify centre           # center window list for clarity

      # visual notification of activity in other windows
      setw -g monitor-activity on
      set -g visual-activity on

      # better tmux/vim navigation
      bind -n M-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-h) || tmux select-pane -L"
      bind -n M-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-j) || tmux select-pane -D"
      bind -n M-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-k) || tmux select-pane -U"
      bind -n M-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-l) || tmux select-pane -R"

      # open a new split or window in the current directory
      bind '"' split-window -c "#{pane_current_path}"
      bind % split-window -h -c "#{pane_current_path}"
      bind c new-window -c "#{pane_current_path}"

      # ----------------------
      # gruvbox colors
      # -----------------------
      # There is a gruvbox tmux plugin [1] but it mingles the formatting and
      # content of the status bars. I intend to try and fix this, but am
      # putting things inline for now.
      #
      # [1] https://github.com/egel/tmux-gruvbox
      #

      ## COLORSCHEME: gruvbox dark
      set-option -g status "on"

      # default statusbar color
      set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1

      # default window title colors
      set-window-option -g window-status-style bg=colour214,fg=colour237 # bg=yellow, fg=bg1

{'fraction_non_alphanumeric': 0.1402033633163864, 'fraction_numerical': 0.016425498631208447, 'mean_word_length': 1.9964850615114236, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3545297', 'n_tokens_mistral': 1684, 'n_tokens_neox': 1574, 'n_words': 556}