From 485c33950ddbc5b50bb278bc193c2cc0346d7b7f Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Fri, 17 Jul 2026 22:16:31 +0530 Subject: refactor(neomutt): made some refactoring changes to neomutt config Reduced the sizes of individual files for the neomutt configuration --- modules/communication/neomutt/macros.nix | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 modules/communication/neomutt/macros.nix (limited to 'modules/communication/neomutt/macros.nix') diff --git a/modules/communication/neomutt/macros.nix b/modules/communication/neomutt/macros.nix new file mode 100644 index 0000000..e1a754e --- /dev/null +++ b/modules/communication/neomutt/macros.nix @@ -0,0 +1,37 @@ +{ config, lib, ... }: + +{ + config.programs.neomutt.binds = lib.mkIf config.communication.neomutt.enable [ + { + map = [ + "index" + "pager" + ]; + key = "O"; + action = "set my_wait_key=$wait_key wait_key=no${lib.getExe config.scripts.neomutt-sync.package}set wait_key=$my_wait_key"; + } + { + # gx: extract links from the current message and open one, vim-netrw style + map = [ + "index" + "pager" + ]; + key = "gx"; + action = "urlscan"; + } + { + map = [ + "index" + "pager" + ]; + key = "gl"; + action = "less ~/.config/neomutt/flag_legend.txt"; + } + { + # ZZ: save and quit, vim-style (sync mailbox, then quit) + map = [ "index" ]; + key = "ZZ"; + action = ""; + } + ]; +} -- cgit v1.2.3