From a9be2c1cc7496f3e44d982ad379430efefa9e8f0 Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 18 Jun 2021 16:10:51 +0200 Subject: [PATCH] Replace imapnotify with goimapnotify --- goimapnotify/.config/goimapnotify/gmail.conf | 16 ++++++++++++++++ goimapnotify/.config/goimapnotify/uni.conf | 15 +++++++++++++++ imapnotify/.config/imapnotify/gmail.js | 15 --------------- imapnotify/.config/imapnotify/uni.js | 15 --------------- sway/.config/sway/config | 2 -- 5 files changed, 31 insertions(+), 32 deletions(-) create mode 100644 goimapnotify/.config/goimapnotify/gmail.conf create mode 100644 goimapnotify/.config/goimapnotify/uni.conf delete mode 100644 imapnotify/.config/imapnotify/gmail.js delete mode 100644 imapnotify/.config/imapnotify/uni.js diff --git a/goimapnotify/.config/goimapnotify/gmail.conf b/goimapnotify/.config/goimapnotify/gmail.conf new file mode 100644 index 0000000..e530dcb --- /dev/null +++ b/goimapnotify/.config/goimapnotify/gmail.conf @@ -0,0 +1,16 @@ +{ + "host": "imap.gmail.com", + "port": 993, + "tls": true, + "tlsOptions": { + "rejectUnauthorized": true + }, + "username": "akasroua@gmail.com", + "passwordCmd": "pass mail/gmail", + "xoauth2": true, + "onNewMail": "mbsync gmail", + "onNewMailPost": "notmuch new", + "boxes": [ + "INBOX" + ] +} diff --git a/goimapnotify/.config/goimapnotify/uni.conf b/goimapnotify/.config/goimapnotify/uni.conf new file mode 100644 index 0000000..7b33b67 --- /dev/null +++ b/goimapnotify/.config/goimapnotify/uni.conf @@ -0,0 +1,15 @@ +{ + "host": "correo.ugr.es", + "port": 993, + "tls": true, + "tlsOptions": { + "rejectUnauthorized": true + }, + "username": "akasroua@correo.ugr.es", + "passwordCmd": "pass mail/uni", + "onNewMail": "mbsync uni", + "onNewMailPost": "notmuch new", + "boxes": [ + "INBOX" + ] +} diff --git a/imapnotify/.config/imapnotify/gmail.js b/imapnotify/.config/imapnotify/gmail.js deleted file mode 100644 index d3407d6..0000000 --- a/imapnotify/.config/imapnotify/gmail.js +++ /dev/null @@ -1,15 +0,0 @@ -var child_process = require('child_process'); - -function getStdout(cmd) { - var stdout = child_process.execSync(cmd); - return stdout.toString().trim(); -} - -exports.host = "imap.gmail.com" -exports.port = 993; -exports.tls = true; -exports.username = "akasroua@gmail.com"; -exports.password = getStdout("pass mail/gmail"); -exports.onNewMail = "mbsync gmail" -exports.onNewMailPost = "notmuch new" -exports.boxes = [ "INBOX"]; diff --git a/imapnotify/.config/imapnotify/uni.js b/imapnotify/.config/imapnotify/uni.js deleted file mode 100644 index c4ec9d8..0000000 --- a/imapnotify/.config/imapnotify/uni.js +++ /dev/null @@ -1,15 +0,0 @@ -var child_process = require('child_process'); - -function getStdout(cmd) { - var stdout = child_process.execSync(cmd); - return stdout.toString().trim(); -} - -exports.host = "correo.ugr.es" -exports.port = 993; -exports.tls = true; -exports.username = "akasroua@correo.ugr.es"; -exports.password = getStdout("pass mail/uni"); -exports.onNewMail = "mbsync uni" -exports.onNewMailPost = "notmuch new" -exports.boxes = [ "INBOX"]; diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 7e57531..248bef7 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -328,8 +328,6 @@ bindswitch --reload --locked lid:off output $monitor enable exec wl-paste -t text --watch clipman store # kanshi exec kanshi -# imapnotify -exec imapnotify -c ~/.config/imapnotify/uni.js # tmux assign [app_id="tmux"] $workspace1 exec kitty --class tmux -- tmuxp load ~/.tmuxp/local.yaml