modules/aerc: add aba address book

This commit is contained in:
Dmitriy Pleshevskiy 2024-04-20 00:11:44 +03:00
parent 94bb170bca
commit 7055478c6d
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -1,6 +1,23 @@
{ config, lib, pkgs, ... }:
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>";
fill = cmd: ":${cmd}<space>";
@ -15,20 +32,10 @@ let
"mA" = exec "archive flat";
"mS" = exec "move Junk";
"mI" = exec "move INBOX";
};
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=";
});
"af" = pipeAba "--from";
"at" = pipeAba "--to";
"ac" = pipeAba "--cc";
"aa" = pipeAba "--all";
};
in
{
@ -63,6 +70,10 @@ in
column-from = "{{ .From | emails | join \", \" }}";
};
compose = {
address-book-cmd = "${abaPackage}/bin/aba ls '%s'";
};
statusline = {
display-mode = "icon";
};