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";
|
imap.host = "mail.cock.li";
|
||||||
smtp.host = imap.host;
|
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 =
|
posteo =
|
||||||
lib.recursiveUpdate defaults
|
lib.recursiveUpdate defaults
|
||||||
rec {
|
rec {
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ in {
|
|||||||
statusCommand = "env I3RS_GITHUB_TOKEN=${lib.strings.fileContents <secrets/github/notification.token>} ${pkgs.i3status-rust}/bin/i3status-rs ${
|
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> {
|
(pkgs.formats.toml {}).generate "i3status-rust.toml" (import <niveum/lib/i3status-rust.nix> {
|
||||||
inherit (config.niveum) batteryName wirelessInterface;
|
inherit (config.niveum) batteryName wirelessInterface;
|
||||||
|
inherit (config.home-manager.users.me.accounts.email) accounts;
|
||||||
inherit colours;
|
inherit colours;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
wirelessInterface,
|
wirelessInterface,
|
||||||
colours,
|
colours,
|
||||||
batteryName,
|
batteryName,
|
||||||
|
accounts,
|
||||||
}: let
|
}: let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
@@ -10,8 +11,6 @@
|
|||||||
pkgs.writers.writeDash "setsid-command" ''
|
pkgs.writers.writeDash "setsid-command" ''
|
||||||
${pkgs.util-linux}/bin/setsid ${script}
|
${pkgs.util-linux}/bin/setsid ${script}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
accounts = import <niveum/lib/email.nix> {inherit lib;};
|
|
||||||
in {
|
in {
|
||||||
theme = {
|
theme = {
|
||||||
name = "plain";
|
name = "plain";
|
||||||
@@ -114,7 +113,8 @@ in {
|
|||||||
interval = 60 * 5;
|
interval = 60 * 5;
|
||||||
command = let
|
command = let
|
||||||
query-account = name: account: "${pkgs.writers.writeDash "query-imap-${name}" ''
|
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]+' \
|
| ${pkgs.gnugrep}/bin/grep -Eo '[0-9]+' \
|
||||||
| sed 's/^/{"${name}":/;s/$/}/'
|
| sed 's/^/{"${name}":/;s/$/}/'
|
||||||
''} &";
|
''} &";
|
||||||
@@ -130,7 +130,7 @@ in {
|
|||||||
text: (if $sum > 0 then $sum | tostring else "" end),
|
text: (if $sum > 0 then $sum | tostring else "" end),
|
||||||
icon: "mail",
|
icon: "mail",
|
||||||
state: (
|
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"
|
"Warning"
|
||||||
elif $sum > 0 then
|
elif $sum > 0 then
|
||||||
"Info"
|
"Info"
|
||||||
|
|||||||
Reference in New Issue
Block a user