mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
fix(email): show new stuff in info bar and remove gmail accounts
This commit is contained in:
@@ -113,29 +113,6 @@ in {
|
||||
imap.host = "mail.cock.li";
|
||||
smtp.host = imap.host;
|
||||
};
|
||||
google-amro =
|
||||
defaults
|
||||
// rec {
|
||||
address = "amroplay@gmail.com";
|
||||
userName = address;
|
||||
passwordCommand = passwordCommandFrom <secrets/mail/gmail/amroplay>;
|
||||
flavor = "gmail.com";
|
||||
aerc.enable = false;
|
||||
};
|
||||
google-kieran =
|
||||
defaults
|
||||
// rec {
|
||||
address = "kieran.meinhardt@gmail.com";
|
||||
userName = address;
|
||||
passwordCommand = passwordCommandFrom <secrets/mail/gmail/kieran.meinhardt>;
|
||||
flavor = "gmail.com";
|
||||
aerc.enable = false;
|
||||
folders = {
|
||||
drafts = "[Gmail]/Entwürfe";
|
||||
sent = "[Gmail]/Gesendet";
|
||||
trash = "[Gmail]/Papierkorb";
|
||||
};
|
||||
};
|
||||
posteo =
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
|
||||
@@ -178,6 +178,7 @@ in {
|
||||
statusCommand = "env I3RS_GITHUB_TOKEN=${lib.strings.fileContents <secrets/github/notification.token>} ${pkgs.i3status-rust}/bin/i3status-rs ${
|
||||
(pkgs.formats.toml {}).generate "i3status-rust.toml" (import <niveum/lib/i3status-rust.nix> {
|
||||
inherit (config.niveum) batteryName wirelessInterface;
|
||||
inherit (config.home-manager.users.me.accounts.email) accounts;
|
||||
inherit colours;
|
||||
inherit pkgs;
|
||||
})
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
wirelessInterface,
|
||||
colours,
|
||||
batteryName,
|
||||
accounts,
|
||||
}: let
|
||||
inherit (pkgs) lib;
|
||||
|
||||
@@ -10,8 +11,6 @@
|
||||
pkgs.writers.writeDash "setsid-command" ''
|
||||
${pkgs.util-linux}/bin/setsid ${script}
|
||||
'';
|
||||
|
||||
accounts = import <niveum/lib/email.nix> {inherit lib;};
|
||||
in {
|
||||
theme = {
|
||||
name = "plain";
|
||||
@@ -114,7 +113,8 @@ in {
|
||||
interval = 60 * 5;
|
||||
command = let
|
||||
query-account = name: account: "${pkgs.writers.writeDash "query-imap-${name}" ''
|
||||
${pkgs.coreutils}/bin/timeout 1 ${pkgs.curl}/bin/curl -sSL -u ${lib.escapeShellArg "${account.user}:${account.password}"} imaps://${account.imap} -X 'STATUS INBOX (UNSEEN)' \
|
||||
password=$(${toString account.passwordCommand})
|
||||
${pkgs.coreutils}/bin/timeout 1 ${pkgs.curl}/bin/curl -sSL -u ${lib.escapeShellArg account.userName}:"$password" imaps://${account.imap.host} -X 'STATUS INBOX (UNSEEN)' \
|
||||
| ${pkgs.gnugrep}/bin/grep -Eo '[0-9]+' \
|
||||
| sed 's/^/{"${name}":/;s/$/}/'
|
||||
''} &";
|
||||
@@ -130,7 +130,7 @@ in {
|
||||
text: (if $sum > 0 then $sum | tostring else "" end),
|
||||
icon: "mail",
|
||||
state: (
|
||||
if .uni > 0 or .["work-uni"] > 0 or .posteo > 0 then
|
||||
if .["hu-student"] > 0 or .["hu-employee"] > 0 or .posteo > 0 then
|
||||
"Warning"
|
||||
elif $sum > 0 then
|
||||
"Info"
|
||||
|
||||
Reference in New Issue
Block a user