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, ... }:
|
||||
|
||||
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";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue