aboutsummaryrefslogtreecommitdiffstats
path: root/modules/programs/neomutt
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-10 03:56:40 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-10 15:30:26 +0530
commitf3128757b96fe1280d038b0a4311e3ae71230011 (patch)
treeeaf90fb30c0147d45b17ed2a813c1725b76ebd05 /modules/programs/neomutt
parent7cf503351c6d3952ef15d1151d44ad8a122c2393 (diff)
downloadhome-manager-config-f3128757b96fe1280d038b0a4311e3ae71230011.tar.gz
home-manager-config-f3128757b96fe1280d038b0a4311e3ae71230011.zip
feat: some more theme changes to neomutt
added separator character between the columns to make it look cleaner
Diffstat (limited to 'modules/programs/neomutt')
-rw-r--r--modules/programs/neomutt/colorscheme.nix102
-rw-r--r--modules/programs/neomutt/default.nix2
-rw-r--r--modules/programs/neomutt/theme.nix85
3 files changed, 86 insertions, 103 deletions
diff --git a/modules/programs/neomutt/colorscheme.nix b/modules/programs/neomutt/colorscheme.nix
deleted file mode 100644
index 7e157ad..0000000
--- a/modules/programs/neomutt/colorscheme.nix
+++ /dev/null
@@ -1,102 +0,0 @@
-{ config, lib, ... }:
-
-# Colorscheme - True base16 colors for neomutt
-# Uses standard terminal ANSI color names that kitty maps to the base16 onedark-dark scheme
-# Matching the base16 colorscheme used by neovim and other tools
-{
- config.programs.neomutt.extraConfig = lib.mkIf config.programs.neomutt.enable ''
- # vim: filetype=muttrc
- #
- # base16 terminal colors for neomutt
- # ANSI terminal colors are mapped by kitty to base16 onedark-dark
- # Matching the base16 colorscheme used by neovim, bat, and other tools
- #
-
- # basic colors ---------------------------------------------------------
- # fg (baseXX) bg (baseXX)
- color normal white default # base05 on base00
- color error red default # base08 on base00
- color tilde brightblack default # base03 on base00
- color message blue default # base0D on base00
- color markers red default # base08 on base00
- color attachment white default # base05 on base00
- color search magenta default # base0E on base00
- color status brightblue black # base04 on base01
- color indicator white brightcyan # base05 on base02
- color tree yellow default # base0A on base00
-
- # basic monocolor screen
- mono bold bold
- mono underline underline
- mono indicator reverse
- mono error bold
-
- # index ----------------------------------------------------------------
- color index white default "~A" # all messages
- color index red default "~E" # expired messages
- color index blue default "~N" # new messages
- color index blue default "~O" # old messages
- color index magenta default "~Q" # replied messages
- color index green default "~R" # read messages
- color index blue default "~U" # unread messages
- color index blue default "~U~$" # unread, unreferenced
- color index yellow default "~v" # collapsed thread
- color index yellow default "~P" # messages from me
- color index cyan default "~p!~F" # messages to me
- color index cyan default "~N~p!~F" # new messages to me
- color index cyan default "~U~p!~F" # unread messages to me
- color index green default "~R~p!~F" # read messages to me
- color index red default "~F" # flagged messages
- color index red default "~F~p" # flagged messages to me
- color index red default "~N~F" # new flagged messages
- color index red default "~N~F~p" # new flagged messages to me
- color index red default "~U~F~p" # unread flagged messages to me
- color index black red "~D" # deleted messages
- color index cyan default "~v~(!~N)" # collapsed thread, no unread
- color index yellow default "~v~(~N)" # collapsed thread, some unread
- color index green default "~N~v~(~N)" # collapsed thread, unread parent
- color index red black "~v~(~F)!~N" # collapsed thread, flagged no unread
- color index yellow black "~v~(~F~N)" # collapsed thread, flagged & unread
- color index green black "~N~v~(~F~N)" # collapsed thread, unread parent & flagged
- color index green black "~N~v~(~F)" # collapsed thread, unread parent & flagged
- color index cyan black "~v~(~p)" # collapsed thread, messages to me
- color index yellow red "~v~(~D)" # collapsed thread, deleted
-
- # message headers ------------------------------------------------------
- color hdrdefault blue default # base0D
- color header yellow default "^(From)" # base0A
- color header blue default "^(Subject)" # base0D
-
- # body -----------------------------------------------------------------
- color quoted blue default # base0D
- color quoted1 cyan default # base0C
- color quoted2 yellow default # base0A
- color quoted3 red default # base08
- color quoted4 magenta default # base0E
-
- color signature green default # base0B
- color bold white default # base05
- color underline white default # base05
- color normal default default
-
- color body cyan default "[;:][-o][)/(|]" # emoticons
- color body cyan default "[;:][)(|]" # emoticons
- color body cyan default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\
- |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\
- |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?"
- color body cyan default "[ ][*][^*]*[*][ ]?" # more emoticon
- color body cyan default "[ ]?[*][^*]*[*][ ]" # more emoticon
-
- ## pgp
- color body red default "(BAD signature)"
- color body green default "(Good signature)"
- color body brightblack default "^gpg: Good signature .*"
- color body yellow default "^gpg: "
- color body yellow red "^gpg: BAD signature from.*"
- mono body bold "^gpg: Good signature"
- mono body bold "^gpg: BAD signature from.*"
-
- # URL regex
- color body brightred default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
- '';
-}
diff --git a/modules/programs/neomutt/default.nix b/modules/programs/neomutt/default.nix
index 97c6b5f..2787240 100644
--- a/modules/programs/neomutt/default.nix
+++ b/modules/programs/neomutt/default.nix
@@ -8,7 +8,7 @@
{
imports = [
./assertions.nix
- ./colorscheme.nix
+ ./theme.nix
];
config = lib.mkIf config.programs.neomutt.enable {
diff --git a/modules/programs/neomutt/theme.nix b/modules/programs/neomutt/theme.nix
new file mode 100644
index 0000000..8e57645
--- /dev/null
+++ b/modules/programs/neomutt/theme.nix
@@ -0,0 +1,85 @@
+{ config, lib, ... }:
+
+# Colorscheme - True base16 OneDark colors for neomutt
+# Leverages Kitty's precise mapping to base16 (color0-15)
+{
+ config.programs.neomutt.extraConfig = lib.mkIf config.programs.neomutt.enable ''
+ # vim: filetype=muttrc
+ #
+ # Base16 OneDark Dark terminal colors for neomutt
+ # Each column in the index receives a distinct color to keep the UI organized.
+
+ set index_format = "%4C│ %Z │ %{%d/%m %H:%M} │ %-25.25a │ %s"
+
+ # --- Basic UI Colors --------------------------------------------------
+ # fg bg
+ color normal white default # base05 (Standard text)
+ color error red default # base08 (Red)
+ color tilde brightblack default # base03 (Dark Grey)
+ color message cyan default # base0C (Cyan)
+ color markers red default # base08 (Red)
+ color attachment magenta default # base0E (Magenta)
+ color search magenta default # base0E (Magenta)
+
+ # Selected row and status bar
+ color status white brightblack # base05 on base03
+ color indicator black blue # base00 on base0D (Selected email)
+ color tree brightblack default # base03 (Thread arrows)
+
+ # --- Index Columns (The Multi-Color Table) ----------------------------
+ # Applies distinct colors to specific columns for ALL messages (~A)
+ color index_number white default "~A" # base05 (Fixed: was brightblack)
+ color index_date green default "~A" # base0B (Green)
+ color index_flags red default "~A" # base08 (Red)
+ color index_size cyan default "~A" # base0C (Cyan)
+ color index_author yellow default "~A" # base0A (Yellow)
+ color index_subject white default "~A" # base05 (Standard text for Read messages)
+
+ # --- Index Message States ---------------------------------------------
+ # By targeting *only* `index_subject`, we preserve your multi-color
+ # columns while still easily identifying unread or flagged emails.
+ color index_subject blue default "~U" # Unread: Blue (base0D)
+ color index_subject blue default "~N" # New: Blue (base0D)
+ color index_subject red default "~F" # Flagged: Red (base08)
+ color index_subject magenta default "~Q" # Replied: Magenta (base0E)
+ color index_subject black red "~D" # Deleted
+
+ # This rule now colors the "email (name)" column as it is considered the 'author'
+ color index_author yellow default "~A"
+ color index_subject white default "~A" # %s
+
+ # We removed the ~R (Read) override so it stays white.
+ # For Deleted (~D), if brightblack is still too dark to see, we can use a red background instead:
+ color index_subject black red "~D" # Deleted: Black on Red background
+
+ # Thread collapsing states
+ color index_subject yellow default "~v" # Collapsed thread
+ color index_subject blue default "~v~(~N)" # Collapsed with unread inside
+ color index_subject red default "~v~(~F)" # Collapsed with flagged inside
+
+ # --- Message Headers --------------------------------------------------
+ color hdrdefault cyan default # base0C
+ color header yellow default "^(From|To|Cc|Bcc)" # base0A
+ color header blue default "^(Subject)" # base0D
+ color header brightblack default "^(Date)" # base03
+
+ # --- Message Body -----------------------------------------------------
+ color quoted blue default # base0D
+ color quoted1 cyan default # base0C
+ color quoted2 yellow default # base0A
+ color quoted3 red default # base08
+ color quoted4 magenta default # base0E
+
+ color signature green default # base0B
+ color bold white default # base05
+ color underline white default # base05
+
+ # URLs
+ color body blue default "([a-z][a-z0-9+-]*://[^ ]+)"
+
+ # PGP
+ color body green default "(Good signature)"
+ color body red default "(BAD signature)"
+ color body brightblack default "^gpg: "
+ '';
+}