Merge branch 'dev' into logos
mail: use a PGP key as default key, not just for signing add keybindings for univ-nantes fix mail count in statusbar fix mail notification nvim: change keymap prefix for Telescope add Telescope keymap for grepping
This commit is contained in:
commit
5860b497b6
@ -10,7 +10,8 @@ set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@posteo.net/bodies"
|
|||||||
set mbox_type = Maildir
|
set mbox_type = Maildir
|
||||||
|
|
||||||
set crypt_autosign = yes
|
set crypt_autosign = yes
|
||||||
set pgp_sign_as = "0x7F03EA9BEFFCB97F"
|
set pgp_self_encrypt = yes
|
||||||
|
set pgp_default_key = "0x7F03EA9BEFFCB97F"
|
||||||
|
|
||||||
bind index,pager gg noop
|
bind index,pager gg noop
|
||||||
bind index,pager g noop
|
bind index,pager g noop
|
||||||
|
@ -10,7 +10,8 @@ set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@ens-lyon.fr/bodies"
|
|||||||
set mbox_type = Maildir
|
set mbox_type = Maildir
|
||||||
|
|
||||||
set crypt_autosign = yes
|
set crypt_autosign = yes
|
||||||
set pgp_sign_as = "0x9D5279329BB80FA0"
|
set pgp_self_encrypt = yes
|
||||||
|
set pgp_default_key = "0x9D5279329BB80FA0"
|
||||||
|
|
||||||
bind index,pager gg noop
|
bind index,pager gg noop
|
||||||
bind index,pager g noop
|
bind index,pager g noop
|
||||||
|
@ -10,7 +10,8 @@ set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@univ-nantes.fr/bodies"
|
|||||||
set mbox_type = Maildir
|
set mbox_type = Maildir
|
||||||
|
|
||||||
set crypt_autosign = yes
|
set crypt_autosign = yes
|
||||||
set pgp_sign_as = "0x1DD6B2BA6DD78810"
|
set pgp_self_encrypt = yes
|
||||||
|
set pgp_default_key = "0x1DD6B2BA6DD78810"
|
||||||
|
|
||||||
bind index,pager gg noop
|
bind index,pager gg noop
|
||||||
bind index,pager g noop
|
bind index,pager g noop
|
||||||
@ -23,7 +24,7 @@ set signature="$XDG_CONFIG_HOME/mutt/accounts/nantes.signature"
|
|||||||
unmacro index o
|
unmacro index o
|
||||||
macro index o "<shell-escape>mailsync<enter>" "run mbsync to sync david.julien@univ-nantes.fr"
|
macro index o "<shell-escape>mailsync<enter>" "run mbsync to sync david.julien@univ-nantes.fr"
|
||||||
|
|
||||||
mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=thesis" "=admin" "=login" "=teaching" "=teaching/X11I020" "=teaching/X11I040"
|
mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=thesis" "=admin" "=login" "=publications" "=teaching" "=teaching/X11I020" "=teaching/X11I040"
|
||||||
set record = "+Sent"
|
set record = "+Sent"
|
||||||
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
|
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
|
||||||
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
|
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
|
||||||
@ -49,3 +50,12 @@ macro index,pager Ca ";<copy-message>=admin<enter>" "copy mail to admin"
|
|||||||
macro index,pager gl "<change-folder>=login<enter>" "go to login"
|
macro index,pager gl "<change-folder>=login<enter>" "go to login"
|
||||||
macro index,pager Ml ";<save-message>=login<enter>" "move mail to login"
|
macro index,pager Ml ";<save-message>=login<enter>" "move mail to login"
|
||||||
macro index,pager Cl ";<copy-message>=login<enter>" "copy mail to login"
|
macro index,pager Cl ";<copy-message>=login<enter>" "copy mail to login"
|
||||||
|
macro index,pager gp "<change-folder>=publications<enter>" "go to publications"
|
||||||
|
macro index,pager Mp ";<save-message>=publications<enter>" "move mail to publications"
|
||||||
|
macro index,pager Cp ";<copy-message>=publications<enter>" "copy mail to publications"
|
||||||
|
macro index,pager gc2 "<change-folder>=teaching/X11I020<enter>" "go to teaching/X11I020"
|
||||||
|
macro index,pager Mc2 ";<save-message>=teaching/X11I020<enter>" "move mail to teaching/X11I020"
|
||||||
|
macro index,pager Cc2 ";<copy-message>=teaching/X11I020<enter>" "copy mail to teaching/X11I020"
|
||||||
|
macro index,pager gc4 "<change-folder>=teaching/X11I040<enter>" "go to teaching/X11I040"
|
||||||
|
macro index,pager Mc4 ";<save-message>=teaching/X11I040<enter>" "move mail to teaching/X11I040"
|
||||||
|
macro index,pager Cc4 ";<copy-message>=teaching/X11I040<enter>" "copy mail to teaching/X11I040"
|
||||||
|
@ -10,7 +10,8 @@ set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@mailo.com/bodies"
|
|||||||
set mbox_type = Maildir
|
set mbox_type = Maildir
|
||||||
|
|
||||||
set crypt_autosign = yes
|
set crypt_autosign = yes
|
||||||
set pgp_sign_as = "0x86C2FBBE4A4F0F7F"
|
set pgp_self_encrypt = yes
|
||||||
|
set pgp_default_key = "0x86C2FBBE4A4F0F7F"
|
||||||
|
|
||||||
bind index,pager gg noop
|
bind index,pager gg noop
|
||||||
bind index,pager g noop
|
bind index,pager g noop
|
||||||
|
@ -10,7 +10,8 @@ set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@centrale-marseille.fr/
|
|||||||
set mbox_type = Maildir
|
set mbox_type = Maildir
|
||||||
|
|
||||||
set crypt_autosign = no
|
set crypt_autosign = no
|
||||||
set pgp_sign_as = "0x9F46CD164AE1E813"
|
set pgp_self_encrypt = yes
|
||||||
|
set pgp_default_key = "0x9F46CD164AE1E813"
|
||||||
|
|
||||||
bind index,pager gg noop
|
bind index,pager gg noop
|
||||||
bind index,pager g noop
|
bind index,pager g noop
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# More information : https://github.com/LukeSmithxyz/mutt-wizard
|
# More information : https://github.com/LukeSmithxyz/mutt-wizard
|
||||||
|
|
||||||
|
|
||||||
set mailcap_path = /home/swytch/.config/mutt/mailcap:$mailcap_path
|
set mailcap_path = $XDG_CONFIG_HOME/mutt/mailcap:$mailcap_path
|
||||||
set mime_type_query_command = "file --mime-type -b %s"
|
set mime_type_query_command = "file --mime-type -b %s"
|
||||||
set date_format="%d/%m/%y %I:%M%p"
|
set date_format="%d/%m/%y %I:%M%p"
|
||||||
set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)"
|
set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)"
|
||||||
|
@ -18,11 +18,13 @@ vim.keymap.set("n", "<leader><enter>", "<cmd>w! | !compiler %<CR>")
|
|||||||
vim.keymap.set("n", "<leader>u", function() require("packer").sync() end)
|
vim.keymap.set("n", "<leader>u", function() require("packer").sync() end)
|
||||||
|
|
||||||
-- telescope
|
-- telescope
|
||||||
vim.keymap.set("n", "<leader>ff",
|
vim.keymap.set("n", "<leader>tf",
|
||||||
function() require("telescope.builtin").find_files() end)
|
function() require("telescope.builtin").find_files() end)
|
||||||
vim.keymap.set("n", "<leader>fb",
|
vim.keymap.set("n", "<leader>tb",
|
||||||
function() require("telescope.builtin").buffers() end)
|
function() require("telescope.builtin").buffers() end)
|
||||||
vim.keymap.set("n", "<leader>fl",
|
vim.keymap.set("n", "<leader>tg",
|
||||||
|
function() require("telescope.builtin").grep_string() end)
|
||||||
|
vim.keymap.set("n", "<leader>tl",
|
||||||
function() require("telescope.builtin").live_grep() end)
|
function() require("telescope.builtin").live_grep() end)
|
||||||
|
|
||||||
-- colorscheme
|
-- colorscheme
|
||||||
|
@ -32,25 +32,16 @@ export GPG_TTY=$TTY
|
|||||||
notify() {
|
notify() {
|
||||||
notify-send "neomutt" " $2 new mail(s) in \`$1\` account."
|
notify-send "neomutt" " $2 new mail(s) in \`$1\` account."
|
||||||
}
|
}
|
||||||
messageinfo() {
|
|
||||||
notify-send " $from:" "$subject"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check account for new mail. Notify if there is new content.
|
# Check account for new mail. Notify if there is new content.
|
||||||
syncandnotify() {
|
syncandnotify() {
|
||||||
acc="$(echo "$account" | sed "s/.*\///")"
|
acc="$(echo "$account" | sed "s/.*\///")"
|
||||||
mbsync "$acc"
|
mbsync "$acc"
|
||||||
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc -path */new/* -type f -newer "${XDG_STATE_HOME:-$HOME/.local/state}/mailsynclastrun" | grep -iv "trash" 2>/dev/null)"
|
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc -path */new/* -type f | grep -iv -e "trash" -e "drafts" 2>/dev/null)"
|
||||||
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
|
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
|
||||||
if [ "$newcount" -gt "0" ]; then
|
if [ "$newcount" -gt "0" ]; then
|
||||||
for file in $new; do
|
notify "$acc" "$newcount" &
|
||||||
# Extract subject and sender from mail.
|
[ -n "$(pidof dwmblocks)" ] && kill -40 $(pidof dwmblocks)
|
||||||
from=$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//')
|
|
||||||
subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n 1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n')
|
|
||||||
messageinfo &
|
|
||||||
done
|
|
||||||
notify "$acc" "$newcount" &
|
|
||||||
[ -n "$(pidof dwmblocks)" ] && kill -40 $(pidof dwmblocks)
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
unread=""
|
unread=""
|
||||||
for acc in $(ls "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/)
|
for acc in $(ls "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/)
|
||||||
do
|
do
|
||||||
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc -path */new/* -type f | grep -iv "trash" | wc -l 2>/dev/null)"
|
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc -path */new/* -type f | grep -iv -e "trash" -e "drafts" | wc -l 2>/dev/null)"
|
||||||
if [ $new -gt 0 ]; then
|
if [ $new -gt 0 ]; then
|
||||||
box=""
|
box=""
|
||||||
[ -n "$(echo "$acc" | sed -n '/@centrale/p')" ] && box=""
|
[ -n "$(echo "$acc" | sed -n '/@centrale/p')" ] && box=""
|
||||||
|
Reference in New Issue
Block a user