blob: e65436c827f4f7a754ec84234bbe564202dccfbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Macros - neomutt macros for sync, URL extraction, flag legend, and quit
{ config, lib, ... }:
{
config.programs.neomutt.macros = 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>";
description = "sync mailbox (run neomutt-sync)";
}
{
# gx: extract links from the current message and open one, vim-netrw style
map = [
"index"
"pager"
];
key = "gx";
action = "<pipe-message>urlscan<Enter>";
description = "extract links from message (netrw-style)";
}
{
map = [
"index"
"pager"
];
key = "gl";
action = "<shell-escape>less ~/.config/neomutt/flag_legend.txt<enter>";
description = "show flag legend";
}
{
# gF: clear the current limit/filter and show every message again,
# the counterpart to gf (interactive limit prompt) in binds.nix
map = [ "index" ];
key = "gF";
action = "<limit>~A<enter>";
description = "clear limit/filter, show all messages";
}
{
# ZZ: save and quit, vim-style (sync mailbox, then quit)
map = [ "index" ];
key = "ZZ";
action = "<sync-mailbox><quit>";
description = "save changes and quit";
}
{
# ZQ: quit without saving, vim-style counterpart to ZZ
map = [ "index" ];
key = "ZQ";
action = "<exit>";
description = "quit without saving";
}
];
}
|