Working on neomutt setup and some other small fixes
This commit is contained in:
parent
ab9bd17296
commit
ddbee7f692
12
config.yaml
12
config.yaml
|
@ -22,7 +22,7 @@ dotfiles:
|
|||
d_neomutt:
|
||||
dst: ~/.config/neomutt
|
||||
src: .config/neomutt
|
||||
d_goimapnotify:
|
||||
d_imapnotify:
|
||||
dst: ~/.config/imapnotify
|
||||
src: .config/imapnotify
|
||||
f_init.vim:
|
||||
|
@ -33,12 +33,12 @@ dotfiles:
|
|||
- vim-plug
|
||||
dst: ~/.config/nvim/conf.d
|
||||
src: .config/nvim/conf.d
|
||||
f_user-dirs.dirs:
|
||||
dst: ~/.config/user-dirs.dirs
|
||||
src: .config/user-dirs.dirs
|
||||
f_coc-settings.json:
|
||||
dst: ~/.config/nvim/coc-settings.json
|
||||
src: .config/nvim/coc-settings.json
|
||||
d_scripts:
|
||||
dst: ~/.scripts
|
||||
src: .scripts
|
||||
d_sway:
|
||||
dst: ~/.config/sway
|
||||
src: .config/sway
|
||||
|
@ -178,7 +178,6 @@ profiles:
|
|||
- f_ranger.conf
|
||||
- f_ssh.conf
|
||||
- f_authorized_keys
|
||||
- d_scripts
|
||||
- d_nvim_config
|
||||
- f_init.vim
|
||||
- f_coc-settings.json
|
||||
|
@ -187,7 +186,7 @@ profiles:
|
|||
email:
|
||||
dotfiles:
|
||||
- d_neomutt
|
||||
- d_goimapnotify
|
||||
- d_imapnotify
|
||||
- f_mbsyncrc
|
||||
- f_msmtp_config
|
||||
media:
|
||||
|
@ -229,6 +228,7 @@ profiles:
|
|||
- Pacman
|
||||
dotfiles:
|
||||
- f_paru.conf
|
||||
- f_user-dirs.dirs
|
||||
Moria:
|
||||
include:
|
||||
- terminal
|
||||
|
|
2
dotdrop
2
dotdrop
|
@ -1 +1 @@
|
|||
Subproject commit d42d810ab1842c9568f655127491eeedf1d376fc
|
||||
Subproject commit fe2681e32ca6d387cd9693bb704b2273b440e664
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"host": "imap.migadu.com",
|
||||
"port": 993,
|
||||
"tls": true,
|
||||
"tlsOptions": {
|
||||
"rejectUnauthorized": true
|
||||
},
|
||||
"username": "admin@korhonen.cc",
|
||||
"password": "{{@@ env['PASS_EMAIL_ADMIN'] @@}}",
|
||||
"onNewMail": "mbsync admin@korhonen.cc",
|
||||
"onNewMailPost": "",
|
||||
"boxes": [ "INBOX" ]
|
||||
}
|
19
home/.config/imapnotify/admin@korhonen.cc.js
Normal file
19
home/.config/imapnotify/admin@korhonen.cc.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
var child_process = require("child_process");
|
||||
|
||||
function getStdout(cmd) {
|
||||
var stdout = child_process.execSync(cmd);
|
||||
return stdout.toString().trim();
|
||||
}
|
||||
|
||||
exports.host = "imap.migadu.com";
|
||||
exports.port = 993;
|
||||
exports.tls = true;
|
||||
exports.tlsOptions = {
|
||||
rejectUnauthorized: true,
|
||||
};
|
||||
exports.username = "admin@korhonen.cc";
|
||||
exports.password = "{{@@ env['PASS_EMAIL_ADMIN'] @@}}";
|
||||
exports.onNewMail = "mbsync admin@korhonen.cc";
|
||||
exports.onNewMailPost =
|
||||
"~/git/dotfiles/scripts/mail/notify-new-mail.sh admin@korhonen.cc";
|
||||
exports.boxes = ["INBOX"];
|
19
home/.config/imapnotify/functionalhacker@korhonen.cc.js
Normal file
19
home/.config/imapnotify/functionalhacker@korhonen.cc.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
var child_process = require("child_process");
|
||||
|
||||
function getStdout(cmd) {
|
||||
var stdout = child_process.execSync(cmd);
|
||||
return stdout.toString().trim();
|
||||
}
|
||||
|
||||
exports.host = "imap.migadu.com";
|
||||
exports.port = 993;
|
||||
exports.tls = true;
|
||||
exports.tlsOptions = {
|
||||
rejectUnauthorized: true,
|
||||
};
|
||||
exports.username = "functionalhacker@korhonen.cc";
|
||||
exports.password = "{{@@ env['PASS_EMAIL_HACKER'] @@}}";
|
||||
exports.onNewMail = "mbsync functionalhacker@korhonen.cc";
|
||||
exports.onNewMailPost =
|
||||
"~/git/dotfiles/scripts/mail/notify-new-mail.sh functionalhacker@korhonen.cc";
|
||||
exports.boxes = ["INBOX"];
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"host": "imap.migadu.com",
|
||||
"port": 993,
|
||||
"tls": true,
|
||||
"tlsOptions": {
|
||||
"rejectUnauthorized": true
|
||||
},
|
||||
"username": "marko@korhonen.cc",
|
||||
"password": "{{@@ env['PASS_EMAIL_MARKO'] @@}}",
|
||||
"onNewMail": "mbsync marko@korhonen.cc",
|
||||
"onNewMailPost": "",
|
||||
"boxes": [ "INBOX" ]
|
||||
}
|
19
home/.config/imapnotify/marko@korhonen.cc.js
Normal file
19
home/.config/imapnotify/marko@korhonen.cc.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
var child_process = require("child_process");
|
||||
|
||||
function getStdout(cmd) {
|
||||
var stdout = child_process.execSync(cmd);
|
||||
return stdout.toString().trim();
|
||||
}
|
||||
|
||||
exports.host = "imap.migadu.com";
|
||||
exports.port = 993;
|
||||
exports.tls = true;
|
||||
exports.tlsOptions = {
|
||||
rejectUnauthorized: true,
|
||||
};
|
||||
exports.username = "marko@korhonen.cc";
|
||||
exports.password = "{{@@ env['PASS_EMAIL_MARKO'] @@}}";
|
||||
exports.onNewMail = "mbsync marko@korhonen.cc";
|
||||
exports.onNewMailPost =
|
||||
"~/git/dotfiles/scripts/mail/notify-new-mail.sh marko@korhonen.cc";
|
||||
exports.boxes = ["INBOX"];
|
|
@ -1,31 +1,31 @@
|
|||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://invidio.us/.*
|
||||
|
||||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://(m.)?(www.)?youtube.com/watch\?.*v=
|
||||
|
||||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://(www.)?youtube.com/playlist\?.*list=
|
||||
|
||||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://(www.)?youtu.be/
|
||||
|
||||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://(www.)?(m.)?twitch.tv/
|
||||
|
||||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://(?:[a-z0-9\-]+\.)+[a-z]{2,6}(?:/[^/#?]+)+\.(?:mp4|mkv|webm|avi|3gp|gif|gifv)
|
||||
|
||||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://www.facebook.com/.*/videos/
|
||||
|
||||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://gfycat.com/.*
|
||||
|
||||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://vimeo.com/.*
|
||||
|
||||
umpv %U
|
||||
mpvqueue %U
|
||||
^https?://v.redd.it/.*
|
||||
|
||||
imgurviewer %U
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
music_directory "~/Music"
|
||||
playlist_directory "~/Music/Playlists"
|
||||
music_directory "~/music"
|
||||
playlist_directory "~/music/Playlists"
|
||||
db_file "~/.mpd/database"
|
||||
log_file "~/.mpd/log"
|
||||
pid_file "~/.mpd/pid"
|
||||
|
|
|
@ -1,25 +1,26 @@
|
|||
defaults
|
||||
auth on
|
||||
tls on
|
||||
tls_starttls off
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
logfile ~/.log/msmtp.log
|
||||
host smtp.migadu.com
|
||||
port 465
|
||||
|
||||
# functionalhacker@korhonen.cc
|
||||
account functionalhacker@korhonen.cc
|
||||
from functionalhacker@korhonen.cc
|
||||
user functionalhacker@korhonen.cc
|
||||
password "{{@@ env['PASS_EMAIL_HACKER'] @@}}"
|
||||
|
||||
# marko@korhonen.cc
|
||||
account marko@korhonen.cc
|
||||
from marko@korhonen.cc
|
||||
user marko@korhonen.cc
|
||||
password "{{@@ env['PASS_EMAIL_MARKO'] @@}}"
|
||||
auth on
|
||||
tls on
|
||||
tls_starttls off
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
logfile ~/.log/msmtp/marko@korhonen.cc.log
|
||||
host smtp.migadu.com
|
||||
port 465
|
||||
|
||||
# admin@korhonen.cc
|
||||
account admin@korhonen.cc
|
||||
from admin@korhonen.cc
|
||||
user admin@korhonen.cc
|
||||
password "{{@@ env['PASS_EMAIL_ADMIN'] @@}}"
|
||||
auth on
|
||||
tls on
|
||||
tls_starttls off
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
logfile ~/.log/msmtp/admin@korhonen.cc.log
|
||||
host smtp.migadu.com
|
||||
port 465
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
# vim: filetype=neomuttrc
|
||||
|
||||
set my_email = "admin@korhonen.cc"
|
||||
set from = $my_email
|
||||
set sendmail = "/usr/bin/msmtp -a $my_email"
|
||||
set realname = "Marko Korhonen"
|
||||
set status_format = "-%r-Mutt: $my_email %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---"
|
||||
set mbox_type = Maildir
|
||||
set folder = "~/.mail/$my_email"
|
||||
set mbox = "+INBOX"
|
||||
set record = "+INBOX"
|
||||
set postponed = "+Drafts"
|
||||
set spoolfile = "+INBOX"
|
||||
mailboxes = +INBOX
|
|
@ -1,14 +0,0 @@
|
|||
# vim: filetype=neomuttrc
|
||||
|
||||
set my_email = "marko@korhonen.cc"
|
||||
set from = $my_email
|
||||
set sendmail = "/usr/bin/msmtp -a $my_email"
|
||||
set realname = "Marko Korhonen"
|
||||
set status_format = "-%r-Mutt: $my_email %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---"
|
||||
set mbox_type = Maildir
|
||||
set folder = "~/.mail/$my_email"
|
||||
set mbox = "+INBOX"
|
||||
set record = "+INBOX"
|
||||
set postponed = "+Drafts"
|
||||
set spoolfile = "+INBOX"
|
||||
mailboxes = +INBOX
|
|
@ -1 +0,0 @@
|
|||
color normal default default
|
|
@ -1,13 +0,0 @@
|
|||
# vim: filetype=neomuttrc
|
||||
|
||||
set sendmail = "/usr/bin/msmtp"
|
||||
set mbox_type = Maildir
|
||||
set folder = ~/.mail
|
||||
set spoolfile = +Personal/INBOX
|
||||
|
||||
source ~/.config/neomutt/appearance
|
||||
source ~/.config/neomutt/sidebar
|
||||
source ~/.config/neomutt/accounts/marko@korhonen.cc
|
||||
|
||||
macro index <f2> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/marko@korhonen.cc<enter><change-folder>!<enter>'
|
||||
macro index <f3> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/admin@korhonen.cc<enter><change-folder>!<enter>'
|
|
@ -1,5 +0,0 @@
|
|||
# vim: filetype=neomuttrc
|
||||
|
||||
set sidebar_visible = yes
|
||||
set sidebar_indent_string = ' '
|
||||
sidebar_whitelist '~/.mail/<>/INBOX'
|
|
@ -3,5 +3,5 @@
|
|||
set $mod Mod4
|
||||
set $term alacritty
|
||||
set $gnome-schema org.gnome.desktop.interface
|
||||
set $wallpaper ~/Pictures/Wallpapers/random/$(ls ~/Pictures/Wallpapers/random | sort -R | tail -n 1)
|
||||
set $wallpaper ~/pictures/Wallpapers/random/$(ls ~/Pictures/Wallpapers/random | sort -R | tail -n 1)
|
||||
set $scripts ~/.config/sway/scripts
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
XDG_DESKTOP_DIR="$HOME/Desktop"
|
||||
XDG_DOWNLOAD_DIR="$HOME/Downloads"
|
||||
XDG_TEMPLATES_DIR="$HOME/Templates"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/Public"
|
||||
XDG_DOCUMENTS_DIR="$HOME/Documents"
|
||||
XDG_MUSIC_DIR="$HOME/Music"
|
||||
XDG_PICTURES_DIR="$HOME/Pictures"
|
||||
XDG_VIDEOS_DIR="$HOME/Videos"
|
||||
XDG_DESKTOP_DIR="$HOME/desktop"
|
||||
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||
XDG_TEMPLATES_DIR="$HOME/templates"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/public"
|
||||
XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||
XDG_MUSIC_DIR="$HOME/music"
|
||||
XDG_PICTURES_DIR="$HOME/pictures"
|
||||
XDG_VIDEOS_DIR="$HOME/videos"
|
||||
|
|
|
@ -4,8 +4,7 @@ alias gac='ga && gc'
|
|||
alias gpull='git pull'
|
||||
alias gpush='git push'
|
||||
|
||||
# Access server mariadb
|
||||
alias moria-mariadb='ssh -tt moria docker exec -it mariadb mysql -p'
|
||||
alias mutt='neomutt'
|
||||
|
||||
# Syntax highlighting cat if output is a terminal
|
||||
cat() {
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
### functionalhacker@korhonen.cc #####################################
|
||||
IMAPAccount functionalhacker@korhonen.cc
|
||||
Host imap.migadu.com
|
||||
User functionalhacker@korhonen.cc
|
||||
Pass "{{@@ env['PASS_EMAIL_HACKER'] @@}}"
|
||||
SSLType IMAPS
|
||||
Port 993
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
IMAPStore functionalhacker@korhonen.cc-remote
|
||||
Account functionalhacker@korhonen.cc
|
||||
|
||||
MaildirStore functionalhacker@korhonen.cc-local
|
||||
Subfolders Verbatim
|
||||
Path ~/.mail/functionalhacker@korhonen.cc/
|
||||
Inbox ~/.mail/functionalhacker@korhonen.cc/INBOX
|
||||
|
||||
Channel functionalhacker@korhonen.cc
|
||||
Master :functionalhacker@korhonen.cc-remote:
|
||||
Slave :functionalhacker@korhonen.cc-local:
|
||||
Create Both
|
||||
Patterns *
|
||||
SyncState *
|
||||
#################################################################
|
||||
|
||||
### marko@korhonen.cc #####################################
|
||||
IMAPAccount marko@korhonen.cc
|
||||
Host imap.migadu.com
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
defaults
|
||||
auth on
|
||||
logfile ~/.msmtp.log
|
||||
tls on
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
# reekymarko@reekynet.com
|
||||
account reekymarko@reekynet.com
|
||||
host smtp.migadu.com
|
||||
port 587
|
||||
from reekymarko@reekynet.com
|
||||
user reekymarko@reekynet.com
|
||||
passwordeval "pass email/reekymarko@reekynet.com | head -n 1"
|
||||
|
||||
# marko.korhonen@reekynet.com
|
||||
account marko.korhonen@reekynet.com
|
||||
host smtp.migadu.com
|
||||
port 587
|
||||
from marko.korhonen@reekynet.com
|
||||
user marko.korhonen@reekynet.com
|
||||
passwordeval "pass email/marko.korhonen@reekynet.com | head -n 1"
|
||||
|
||||
|
||||
# admin@reekynet.com
|
||||
account admin@reekynet.com
|
||||
host smtp.migadu.com
|
||||
port 587
|
||||
from admin@reekynet.com
|
||||
user admin@reekynet.com
|
||||
passwordeval "pass email/admin@reekynet.com | head -n 1"
|
||||
|
||||
# marko.korhonen@metropolia.fi
|
||||
account marko.korhonen@metropolia.fi
|
||||
host smtp.metropolia.fi
|
||||
port 587
|
||||
from marko.korhonen@metropolia.fi
|
||||
user markoak
|
||||
passwordeval "pass email/marko.korhonen@metropolia.fi | head -n 1"
|
24
scripts/mail/notify-new-mail.sh
Executable file
24
scripts/mail/notify-new-mail.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
NEWMAILDIR=~/.mail/$1/INBOX/new
|
||||
COUNT=$(ls $NEWMAILDIR | wc -l)
|
||||
ICON=/usr/share/icons/Papirus-Dark/64x64/apps/email.svg
|
||||
SOUND=/usr/share/sounds/Oxygen-Im-Message-In.ogg
|
||||
|
||||
|
||||
if [ $COUNT -ne 0 ]; then
|
||||
mpv $SOUND &
|
||||
fi
|
||||
|
||||
if [ $COUNT -gt 1 ]; then
|
||||
fromaddress=$(cat $NEWMAILDIR/$(ls $NEWMAILDIR | sort -R | tail -1) | formail -x From | tail -1)
|
||||
notify-send.sh -i $ICON "$COUNT new messages in $1" "From $fromaddress and others"
|
||||
|
||||
elif [ $COUNT -eq 1 ]; then
|
||||
mailsubject=$(cat $NEWMAILDIR/* | formail -x Subject)
|
||||
fromaddress=$(cat $NEWMAILDIR/* | formail -x From | tail -1)
|
||||
|
||||
notify-send.sh -i $ICON "New message in $1" "$fromaddress $mailsubject"
|
||||
else
|
||||
echo "No new mail"
|
||||
fi
|
|
@ -9,6 +9,7 @@ export PASS_MPD_ADMIN="$(pass linux/mpd-admin | head -1)"
|
|||
export PASS_IPMI="$(pass selfhosted/idrac | head -1)"
|
||||
export PASS_MQTT="$(pass selfhosted/mqtt.reekynet.com | head -1)"
|
||||
|
||||
export PASS_EMAIL_HACKER="$(pass email/functionalhacker@korhonen.cc | head -1)"
|
||||
export PASS_EMAIL_MARKO="$(pass email/marko@korhonen.cc | head -1)"
|
||||
export PASS_EMAIL_ADMIN="$(pass email/admin@korhonen.cc | head -1)"
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ export PASS_MPD_ADMIN="$PASS_MPD_ADMIN"
|
|||
export PASS_IPMI="$PASS_IPMI"
|
||||
export PASS_MQTT="$PASS_MQTT"
|
||||
|
||||
export PASS_EMAIL_HACKER="$PASS_EMAIL_HACKER"
|
||||
export PASS_EMAIL_MARKO="$PASS_EMAIL_MARKO"
|
||||
export PASS_EMAIL_ADMIN="$PASS_EMAIL_ADMIN"
|
||||
|
||||
|
|
Loading…
Reference in a new issue