Fix email i3block
This commit is contained in:
parent
f1d4266cb4
commit
d4c9ab3eb8
@ -8,6 +8,12 @@ in {
|
|||||||
services = [ ];
|
services = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
secrets.email = {
|
||||||
|
owner = "balsoft:users";
|
||||||
|
services = [ ];
|
||||||
|
encrypted = "/home/balsoft/.password-store/email/balsoft@balsoft.ru.gpg";
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.balsoft = {
|
home-manager.users.balsoft = {
|
||||||
wayland.windowManager.sway.config.bars = [{
|
wayland.windowManager.sway.config.bars = [{
|
||||||
id = "default";
|
id = "default";
|
||||||
@ -64,7 +70,10 @@ in {
|
|||||||
(scrint "time" 1)
|
(scrint "time" 1)
|
||||||
]);
|
]);
|
||||||
systemd.user.services.swaybar = {
|
systemd.user.services.swaybar = {
|
||||||
Unit = { Description = "Start default bar"; };
|
Unit = {
|
||||||
|
Description = "Start default bar";
|
||||||
|
X-RestartIfChanged = true;
|
||||||
|
};
|
||||||
|
|
||||||
Install.WantedBy = [ "sway-session.target" ];
|
Install.WantedBy = [ "sway-session.target" ];
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
#!${python3}/bin/python3
|
#!${python3}/bin/python3
|
||||||
import imaplib
|
import imaplib
|
||||||
obj = imaplib.IMAP4_SSL('balsoft.ru', 993)
|
obj = imaplib.IMAP4_SSL('balsoft.ru', 993)
|
||||||
obj.login("balsoft@balsoft.ru", "${config.secrets.gnome-keyring-envsubst-email.decrypted}")
|
password = open("${config.secrets.email.decrypted}").read()[:-1:]
|
||||||
|
obj.login("balsoft@balsoft.ru", password)
|
||||||
obj.select()
|
obj.select()
|
||||||
l = len(obj.search(None, 'unseen')[1][0].split())
|
l = len(obj.search(None, 'unseen')[1][0].split())
|
||||||
if l == 0:
|
if l == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user