<commit_before>{ config, lib, pkgs, ... }:

with lib;

let

  cfg = config.programs.termite;

  vteInitStr = ''
    # See https://github.com/thestinger/termite#id1
    if [[ $TERM == xterm-termite ]]; then
      . ${pkgs.termite.vte-ng}/etc/profile.d/vte.sh
    fi
  '';

in

{
  options = {
    programs.termite = {
      enable = mkEnableOption "Termite VTE-based terminal";

      allowBold = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Allow the output of bold characters when the bold escape sequence appears.
        '';
      };

      audibleBell = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Have the terminal beep on the terminal bell.";
      };

      clickableUrl = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Auto-detected URLs can be clicked on to open them in  your browser.
          Only enabled if a browser is configured or detected.
        '';
      };

      dynamicTitle = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Settings dynamic title allows the terminal and the shell to
          update the terminal's title.
        '';
      };

      fullscreen = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Enables entering fullscreen mode by pressing F11.";
      };

      mouseAutohide = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Automatically hide the mouse pointer when you start typing.";
      };

      scrollOnOutput = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Scroll to the bottom when the shell generates output.";
      };

      scrollOnKeystroke = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Scroll to the bottom automatically when a key is pressed.";
      };

      searchWrap = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Search from top again when you hit the bottom.";
      };

      urgentOnBell = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Sets the window as urgent on the terminal bell.";
      };

      font = mkOption {
        default = null;
        example = "Monospace 12";
        type = types.nullOr types.str;
        description = "The font description for the terminal's font.";
      };

      geometry = mkOption {
        default = null;
        example = "640x480";
        type = types.nullOr types.str;
        description = "The default window geometry for new terminal windows.";
      };

      iconName = mkOption {
        default = null;
        example = "terminal";
        type = types.nullOr types.str;
        description = "The name of the icon to be used for the terminal process.";
      };

      scrollbackLines = mkOption {
        default = null;
        example = 10000;
        type = types.nullOr types.int;
        description = "Set the number of lines to limit the terminal's scrollback.";
      };

      browser = mkOption {
        default = null;
        type = types.nullOr types.str;
        example = "${pkgs.xdg_utils}/xdg-open";
        description = ''
          Set the default browser for opening links. If its not set, $BROWSER is read.
          If that's not set, url hints will be disabled.
        '';
      };

      cursorBlink = mkOption {
        default = null;
        example = "system";
        type = types.nullOr (types.enum [ "system" "on" "off" ]);
        description = ''
          Specify the how the terminal's cursor should behave.
          Accepts system to respect the gtk global configuration,
          on and off to explicitly enable or disable them.
        '';
      };

      cursorShape = mkOption {
        default = null;
        example = "block";
        type = types.nullOr (types.enum [ "block" "underline" "ibeam" ]);
        description = ''
          Specify how the cursor should look. Accepts block, ibeam and underline.
        '';
      };

      filterUnmatchedUrls = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Whether to hide url hints not matching input in url hints mode.";
      };

      modifyOtherKeys = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Emit escape sequences for extra keys,
          like the modifyOtherKeys resource for
          <citerefentry>
            <refentrytitle>xterm</refentrytitle>
            <manvolnum>1</manvolnum>
          </citerefentry>.
        '';
      };

      sizeHints = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Enable size hints. Locks the terminal resizing
          to increments of the terminal's cell size.
          Requires a window manager that respects scroll hints.
        '';
      };

      scrollbar = mkOption {
        default = null;
        type = types.nullOr (types.enum [ "off" "left" "right" ]);
        description = "Scroll to the bottom when the shell generates output.";
      };

      backgroundColor = mkOption {
        default = null;
        example = "rgba(63, 63, 63, 0.8)";
        type = types.nullOr types.str;
        description = "Background color value.";
      };

      cursorColor = mkOption {
        default = null;
        example = "#dcdccc";<commit_msg>termite: fix scrollbar position option description<commit_after>{ config, lib, pkgs, ... }:

with lib;

let

  cfg = config.programs.termite;

  vteInitStr = ''
    # See https://github.com/thestinger/termite#id1
    if [[ $TERM == xterm-termite ]]; then
      . ${pkgs.termite.vte-ng}/etc/profile.d/vte.sh
    fi
  '';

in

{
  options = {
    programs.termite = {
      enable = mkEnableOption "Termite VTE-based terminal";

      allowBold = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Allow the output of bold characters when the bold escape sequence appears.
        '';
      };

      audibleBell = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Have the terminal beep on the terminal bell.";
      };

      clickableUrl = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Auto-detected URLs can be clicked on to open them in  your browser.
          Only enabled if a browser is configured or detected.
        '';
      };

      dynamicTitle = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Settings dynamic title allows the terminal and the shell to
          update the terminal's title.
        '';
      };

      fullscreen = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Enables entering fullscreen mode by pressing F11.";
      };

      mouseAutohide = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Automatically hide the mouse pointer when you start typing.";
      };

      scrollOnOutput = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Scroll to the bottom when the shell generates output.";
      };

      scrollOnKeystroke = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Scroll to the bottom automatically when a key is pressed.";
      };

      searchWrap = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Search from top again when you hit the bottom.";
      };

      urgentOnBell = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Sets the window as urgent on the terminal bell.";
      };

      font = mkOption {
        default = null;
        example = "Monospace 12";
        type = types.nullOr types.str;
        description = "The font description for the terminal's font.";
      };

      geometry = mkOption {
        default = null;
        example = "640x480";
        type = types.nullOr types.str;
        description = "The default window geometry for new terminal windows.";
      };

      iconName = mkOption {
        default = null;
        example = "terminal";
        type = types.nullOr types.str;
        description = "The name of the icon to be used for the terminal process.";
      };

      scrollbackLines = mkOption {
        default = null;
        example = 10000;
        type = types.nullOr types.int;
        description = "Set the number of lines to limit the terminal's scrollback.";
      };

      browser = mkOption {
        default = null;
        type = types.nullOr types.str;
        example = "${pkgs.xdg_utils}/xdg-open";
        description = ''
          Set the default browser for opening links. If its not set, $BROWSER is read.
          If that's not set, url hints will be disabled.
        '';
      };

      cursorBlink = mkOption {
        default = null;
        example = "system";
        type = types.nullOr (types.enum [ "system" "on" "off" ]);
        description = ''
          Specify the how the terminal's cursor should behave.
          Accepts system to respect the gtk global configuration,
          on and off to explicitly enable or disable them.
        '';
      };

      cursorShape = mkOption {
        default = null;
        example = "block";
        type = types.nullOr (types.enum [ "block" "underline" "ibeam" ]);
        description = ''
          Specify how the cursor should look. Accepts block, ibeam and underline.
        '';
      };

      filterUnmatchedUrls = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = "Whether to hide url hints not matching input in url hints mode.";
      };

      modifyOtherKeys = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Emit escape sequences for extra keys,
          like the modifyOtherKeys resource for
          <citerefentry>
            <refentrytitle>xterm</refentrytitle>
            <manvolnum>1</manvolnum>
          </citerefentry>.
        '';
      };

      sizeHints = mkOption {
        default = null;
        type = types.nullOr types.bool;
        description = ''
          Enable size hints. Locks the terminal resizing
          to increments of the terminal's cell size.
          Requires a window manager that respects scroll hints.
        '';
      };

      scrollbar = mkOption {
        default = null;
        type = types.nullOr (types.enum [ "off" "left" "right" ]);
        description = "Scrollbar position.";
      };

      backgroundColor = mkOption {
        default = null;
        example = "rgba(63, 63, 63, 0.8)";
        type = types.nullOr types.str;
        description = "Background color value.";
      };

      cursorColor = mkOption {
        default = null;
        example = "#dcdccc";
{'fraction_non_alphanumeric': 0.09278714575792354, 'fraction_numerical': 0.004414231482298932, 'mean_word_length': 1.8341255941956467, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1436068', 'n_tokens_mistral': 3087, 'n_tokens_neox': 2974, 'n_words': 1001}