neomutt: add reverse sort options (#1036)
This commit is contained in:
parent
543118ac70
commit
7f748f27bc
|
@ -38,6 +38,19 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sortOptions = [
|
||||||
|
"date"
|
||||||
|
"date-received"
|
||||||
|
"from"
|
||||||
|
"mailbox-order"
|
||||||
|
"score"
|
||||||
|
"size"
|
||||||
|
"spam"
|
||||||
|
"subject"
|
||||||
|
"threads"
|
||||||
|
"to"
|
||||||
|
];
|
||||||
|
|
||||||
bindModule = types.submodule {
|
bindModule = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
map = mkOption {
|
map = mkOption {
|
||||||
|
@ -211,18 +224,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
sort = mkOption {
|
sort = mkOption {
|
||||||
type = types.enum [
|
# allow users to choose any option from sortOptions, or any option prefixed with "reverse-"
|
||||||
"date"
|
type = types.enum
|
||||||
"date-received"
|
(sortOptions ++ (map (option: "reverse-" + option) sortOptions));
|
||||||
"from"
|
|
||||||
"mailbox-order"
|
|
||||||
"score"
|
|
||||||
"size"
|
|
||||||
"spam"
|
|
||||||
"subject"
|
|
||||||
"threads"
|
|
||||||
"to"
|
|
||||||
];
|
|
||||||
default = "threads";
|
default = "threads";
|
||||||
description = "Sorting method on messages.";
|
description = "Sorting method on messages.";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue