diff --git a/modules/neomutt/base16-stylix.muttrc.mustache b/modules/neomutt/base16-stylix.muttrc.mustache new file mode 100644 index 000000000..af9aa6a14 --- /dev/null +++ b/modules/neomutt/base16-stylix.muttrc.mustache @@ -0,0 +1,76 @@ +# Default index colors: +color index #{{base05-hex}} #{{base00-hex}} '.*' +color index_author #{{base09-hex}} #{{base00-hex}} '.*' +color index_number #{{base0D-hex}} #{{base00-hex}} +color index_subject #{{base05-hex}} #{{base00-hex}} '.*' + +# New mail is boldened: +color index bold #{{base0A-hex}} #{{base00-hex}} "~N|~(~U)" +color index_author bold #{{base09-hex}} #{{base00-hex}} "~N|~(~U)" +color index_subject bold #{{base0A-hex}} #{{base00-hex}} "~N|~(~U)" + +# Flagged mail is highlighted: +color index #{{base0C-hex}} #{{base00-hex}} "~F|~(~F)" +color index_author #{{base0B-hex}} #{{base00-hex}} "~F|~(~F)" +color index_subject #{{base0C-hex}} #{{base00-hex}} "~F|~(~F)" + + +# Tagged mail is highlighted: +color index #{{base0A-hex}} #{{base0D-hex}} "~T" +color index_author #{{base0A-hex}} #{{base0D-hex}} "~T" +color index_subject #{{base0C-hex}} #{{base0D-hex}} "~T" + +# Other colors and aesthetic settings: +mono bold bold +mono underline underline +mono indicator reverse +mono error bold + +color normal #{{base05-hex}} #{{base00-hex}} +color indicator #{{base03-hex}} #{{base07-hex}} +color sidebar_highlight #{{base09-hex}} #{{base00-hex}} +color sidebar_divider #{{base03-hex}} #{{base00-hex}} +color sidebar_flagged #{{base09-hex}} #{{base00-hex}} +color sidebar_new #{{base0B-hex}} #{{base00-hex}} +color error #{{base08-hex}} #{{base00-hex}} +color tilde #{{base00-hex}} #{{base00-hex}} +color message #{{base0C-hex}} #{{base00-hex}} +color markers #{{base09-hex}} #{{base07-hex}} +color attachment #{{base05-hex}} #{{base00-hex}} +color search #{{base0E-hex}} #{{base00-hex}} +color status #{{base0A-hex}} #{{base00-hex}} +color hdrdefault #{{base0B-hex}} #{{base00-hex}} +color quoted #{{base0B-hex}} #{{base00-hex}} +color quoted1 #{{base0D-hex}} #{{base00-hex}} +color quoted2 #{{base0C-hex}} #{{base00-hex}} +color quoted3 #{{base0A-hex}} #{{base00-hex}} +color quoted4 #{{base09-hex}} #{{base00-hex}} +color quoted5 #{{base09-hex}} #{{base00-hex}} +color signature #{{base0B-hex}} #{{base00-hex}} +color bold #{{base00-hex}} #{{base00-hex}} +color underline #{{base00-hex}} #{{base00-hex}} + +# Regex highlighting: +color header #{{base0E-hex}} #{{base00-hex}} "^From" +color header #{{base0C-hex}} #{{base00-hex}} "^Subject" +color header #{{base07-hex}} #{{base00-hex}} "^(CC|BCC)" +color header #{{base0D-hex}} #{{base00-hex}} ".*" +color body #{{base09-hex}} #{{base00-hex}} "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses +color body #{{base0D-hex}} #{{base00-hex}} "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL +color body #{{base0B-hex}} #{{base00-hex}} "\`[^\`]*\`" # Green text between ` and ` +color body #{{base0D-hex}} #{{base00-hex}} "^# \.*" # Headings as bold blue +color body #{{base0C-hex}} #{{base00-hex}} "^## \.*" # Subheadings as bold cyan +color body #{{base0B-hex}} #{{base00-hex}} "^### \.*" # Subsubheadings as bold green +color body #{{base0A-hex}} #{{base00-hex}} "^(\t| )*(-|\\*) \.*" # List items as yellow +color body #{{base0C-hex}} #{{base00-hex}} "[;:][-o][)/(|]" # emoticons +color body #{{base0C-hex}} #{{base00-hex}} "[;:][)(|]" # emoticons +color body #{{base0C-hex}} #{{base00-hex}} "[ ][*][^*]*[*][ ]?" # more emoticon? +color body #{{base0C-hex}} #{{base00-hex}} "[ ]?[*][^*]*[*][ ]" # more emoticon? +color body #{{base08-hex}} #{{base00-hex}} "(BAD signature)" +color body #{{base0C-hex}} #{{base00-hex}} "(Good signature)" +color body #{{base03-hex}} #{{base00-hex}} "^gpg: Good signature .*" +color body #{{base0A-hex}} #{{base00-hex}} "^gpg: " +color body #{{base0A-hex}} #{{base08-hex}} "^gpg: BAD signature from.*" +mono body bold "^gpg: Good signature" +mono body bold "^gpg: BAD signature from.*" +color body #{{base08-hex}} #{{base00-hex}} "([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/neomutt/hm.nix b/modules/neomutt/hm.nix new file mode 100644 index 000000000..2d3db2bea --- /dev/null +++ b/modules/neomutt/hm.nix @@ -0,0 +1,23 @@ +{ mkTarget, ... }: +mkTarget { + name = "neomutt"; + humanName = "NeoMutt"; + + config = + { colors }: + { + programs.neomutt = { + settings = { + color_directcolor = "yes"; + }; + extraConfig = '' + source "${ + colors { + template = ./base16-stylix.muttrc.mustache; + extension = ".muttrc"; + } + }" + ''; + }; + }; +} diff --git a/modules/neomutt/meta.nix b/modules/neomutt/meta.nix new file mode 100644 index 000000000..ecd01cbdb --- /dev/null +++ b/modules/neomutt/meta.nix @@ -0,0 +1,6 @@ +{ lib, ... }: +{ + name = "neomutt"; + homepage = "https://github.com/neomutt/neomutt"; + maintainers = [ ]; +}