aboutsummaryrefslogtreecommitdiffstats
path: root/modules/communication/neomutt/macros.nix
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-17 22:16:31 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-17 22:16:31 +0530
commit485c33950ddbc5b50bb278bc193c2cc0346d7b7f (patch)
treec25cbdd3ea2f8f0b199dff2e51618b63ab0495eb /modules/communication/neomutt/macros.nix
parent81a8aff538f4d992d8eb6b1fa4bb71e768f62705 (diff)
downloadhome-manager-config-485c33950ddbc5b50bb278bc193c2cc0346d7b7f.tar.gz
home-manager-config-485c33950ddbc5b50bb278bc193c2cc0346d7b7f.zip
refactor(neomutt): made some refactoring changes to neomutt config
Reduced the sizes of individual files for the neomutt configuration
Diffstat (limited to 'modules/communication/neomutt/macros.nix')
-rw-r--r--modules/communication/neomutt/macros.nix37
1 files changed, 37 insertions, 0 deletions
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 = "<enter-command>set my_wait_key=$wait_key wait_key=no<enter><sync-mailbox><shell-escape>${lib.getExe config.scripts.neomutt-sync.package}<enter><sync-mailbox><enter-command>set wait_key=$my_wait_key<enter>";
+ }
+ {
+ # gx: extract links from the current message and open one, vim-netrw style
+ map = [
+ "index"
+ "pager"
+ ];
+ key = "gx";
+ action = "<pipe-message>urlscan<Enter>";
+ }
+ {
+ map = [
+ "index"
+ "pager"
+ ];
+ key = "gl";
+ action = "<shell-escape>less ~/.config/neomutt/flag_legend.txt<enter>";
+ }
+ {
+ # ZZ: save and quit, vim-style (sync mailbox, then quit)
+ map = [ "index" ];
+ key = "ZZ";
+ action = "<sync-mailbox><quit>";
+ }
+ ];
+}