From 3a3e73c511d3062158441591d05a6b375fa68490 Mon Sep 17 00:00:00 2001 From: Madeleine Sydney Date: Thu, 20 Mar 2025 09:40:37 -0600 Subject: [PATCH] feat: Readline --- modules/home/users/crumb/readline.nix | 45 +++++++++++++++++++++++++++ users/crumb/default.nix | 1 + 2 files changed, 46 insertions(+) create mode 100644 modules/home/users/crumb/readline.nix diff --git a/modules/home/users/crumb/readline.nix b/modules/home/users/crumb/readline.nix new file mode 100644 index 0000000..b473015 --- /dev/null +++ b/modules/home/users/crumb/readline.nix @@ -0,0 +1,45 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.sydnix.users.crumb.readline; +in { + options.sydnix.users.crumb.readline.enable + = lib.mkEnableOption "Readline, à la crumb"; + + config = lib.mkIf cfg.enable { + programs.readline = { + enable = true; + extraConfig = '' + # Unfortunately, the Vi mode is... bad! + set editing-mode emacs + + # Mimmic Comint/Eshell binds. + C-k: history-substring-search-backward + C-j: history-substring-search-forward + C-s: reverse-search-history + + set history-preserve-point on + + set bell-style none + + set blink-matching-paren on + + # Inhibit that god-awful double-tab bullshit. + set show-all-if-ambiguous on + set show-all-if-unmodified on + set completion-ignore-case on + set completion-map-case on + + # Append a '/' when completing the full name of a symlink to a + # directory. This mirrors the behaviour when completing real + # directories. + set mark-symlinked-directories on + + # Visually hint at a file's type in completions. + set visible-stats on + set colored-stats on + ''; + }; + }; +} + diff --git a/users/crumb/default.nix b/users/crumb/default.nix index 408bc0c..97a4eed 100755 --- a/users/crumb/default.nix +++ b/users/crumb/default.nix @@ -45,6 +45,7 @@ waybar.enable = true; discord.enable = true; ghostty.enable = true; + readline.enable = true; }; steam.enable = true; };