modules/aerc: add aba address book
This commit is contained in:
parent
94bb170bca
commit
7055478c6d
1 changed files with 25 additions and 14 deletions
|
@ -1,6 +1,23 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
aercPackage = pkgs.unstable.aerc.override {
|
||||||
|
# support .filename filter
|
||||||
|
buildGoModule = args: pkgs.unstable.buildGoModule (args // rec {
|
||||||
|
version = "6ffc0ed5991bef69a50cbc22647af0a6a0e0a895";
|
||||||
|
src = pkgs.fetchFromSourcehut {
|
||||||
|
owner = "~rjarry";
|
||||||
|
repo = "aerc";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-IyAcTCDSjOmZ6KPr9nYKdxWA0qryeU4jTwxRWzt2NOY=";
|
||||||
|
};
|
||||||
|
vendorHash = "sha256-pir78zXidz7N9Z6uw9YqkkjVRUho0PuKgDTQFli/4fs=";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
abaPackage = pkgs.unstable.aba;
|
||||||
|
|
||||||
|
pipeAba = param: exec ":pipe -m ${abaPackage}/bin/aba parse ${param}";
|
||||||
exec = cmd: ":${cmd}<Enter>";
|
exec = cmd: ":${cmd}<Enter>";
|
||||||
fill = cmd: ":${cmd}<space>";
|
fill = cmd: ":${cmd}<space>";
|
||||||
|
|
||||||
|
@ -15,20 +32,10 @@ let
|
||||||
"mA" = exec "archive flat";
|
"mA" = exec "archive flat";
|
||||||
"mS" = exec "move Junk";
|
"mS" = exec "move Junk";
|
||||||
"mI" = exec "move INBOX";
|
"mI" = exec "move INBOX";
|
||||||
};
|
"af" = pipeAba "--from";
|
||||||
|
"at" = pipeAba "--to";
|
||||||
aercPackage = pkgs.unstable.aerc.override {
|
"ac" = pipeAba "--cc";
|
||||||
# support .filename filter
|
"aa" = pipeAba "--all";
|
||||||
buildGoModule = args: pkgs.unstable.buildGoModule (args // rec {
|
|
||||||
version = "6ffc0ed5991bef69a50cbc22647af0a6a0e0a895";
|
|
||||||
src = pkgs.fetchFromSourcehut {
|
|
||||||
owner = "~rjarry";
|
|
||||||
repo = "aerc";
|
|
||||||
rev = version;
|
|
||||||
hash = "sha256-IyAcTCDSjOmZ6KPr9nYKdxWA0qryeU4jTwxRWzt2NOY=";
|
|
||||||
};
|
|
||||||
vendorHash = "sha256-pir78zXidz7N9Z6uw9YqkkjVRUho0PuKgDTQFli/4fs=";
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -63,6 +70,10 @@ in
|
||||||
column-from = "{{ .From | emails | join \", \" }}";
|
column-from = "{{ .From | emails | join \", \" }}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
compose = {
|
||||||
|
address-book-cmd = "${abaPackage}/bin/aba ls '%s'";
|
||||||
|
};
|
||||||
|
|
||||||
statusline = {
|
statusline = {
|
||||||
display-mode = "icon";
|
display-mode = "icon";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue