update theme

This commit is contained in:
2023-10-13 12:30:13 +02:00
parent 9346aee86d
commit f8070f6e51
37 changed files with 3017 additions and 3364 deletions

View File

@@ -3,12 +3,12 @@
Installation:
#+begin_src bash :tangle no
sudo apt install mbsync msmtp maildir-utils neomutt lynx
paru -S mbsync msmtp neomutt lynx urlview
#+end_src
* =mbsync= - Synchronize Mailboxes
:PROPERTIES:
:header-args:conf: :tangle ~/.mbsyncrc
:header-args:conf: :tangle ~/.config/isync/mbsyncrc
:header-args:conf+: :comments both :mkdirp yes
:CUSTOM_ID: mbsync
:END:
@@ -40,8 +40,8 @@ IMAPStore gmail-remote
Account gmail
MaildirStore gmail-local
Path ~/.mail/gmail/
Inbox ~/.mail/gmail/Inbox
Path ~/.local/share/mails/gmail/
Inbox ~/.local/share/mails/gmail/Inbox
Channel gmail-Home
Far :gmail-remote:INBOX
@@ -106,8 +106,8 @@ IMAPStore esrf-remote
Account esrf
MaildirStore esrf-local
Path ~/.mail/esrf/
Inbox ~/.mail/esrf/Inbox
Path ~/.local/share/mails/esrf/
Inbox ~/.local/share/mails/esrf/Inbox
Channel esrf-Home
Far :esrf-remote:INBOX
@@ -171,8 +171,8 @@ protocol smtp
from dehaeze.thomas@gmail.com
user dehaeze.thomas@gmail.com
passwordeval "pass email/dehaeze.thomas@gmail.com"
proxy_host localhost
proxy_port 8080
# proxy_host localhost
# proxy_port 8080
#+END_SRC
** ESRF Account
@@ -589,7 +589,6 @@ Write/Reply/Forward mail
#+BEGIN_SRC conf
bind index,pager p recall-message
bind index,pager m mail
bind index,pager M resend-message
bind index,pager r reply
bind index,pager R group-reply
bind index,pager b bounce-message
@@ -603,6 +602,7 @@ bind index,pager s sync-mailbox
Sync email
#+BEGIN_SRC conf
macro index,pager e "<shell-escape>$HOME/.config/neomutt/bin/get_new_esrf_mail.sh<enter>"
macro index,pager o "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh<enter>"
macro index,pager O "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh -a<enter>"
#+END_SRC
@@ -646,7 +646,7 @@ bind attach q exit
bind attach <return> view-mailcap
macro attach W <save-entry><kill-line>~/Downloads/<enter>y "Save entry"
macro attach W <save-entry><kill-line>$HOME/Downloads/<enter>y "Save entry"
#+end_src
*** Compose
@@ -684,7 +684,7 @@ tmpfile=/tmp/rangerpick
if [ -z "$1" ]; then
ranger --choosefiles $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}' $tmpfile)" > $tmpfile
elif [ $1 == "dragon" ]; then
dragon --target --print-path --keep > $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}' $tmpfile)" > $tmpfile
dragon-drop --target --print-path --keep > $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}' $tmpfile)" > $tmpfile
elif [ $1 == "clean" ]; then
ls $tmpfile
fi
@@ -721,7 +721,7 @@ bind index,pager \Ch sidebar-toggle-visible
*** Reload Configuration
#+begin_src conf
macro generic,index,pager,editor ,<Space> ":source ~/.config/neomutt/neomuttrc\n" "Reload mutt's configuration file"
macro generic,index,pager,editor ,<Space> ":source $HOME/.config/neomutt/neomuttrc\n" "Reload mutt's configuration file"
#+end_src
*** urlview - Open URL in emails
@@ -738,11 +738,11 @@ macro attach,compose,index,pager \cw "\
*** Searching using Mu
#+begin_src conf
macro index,pager \Cf "<shell-escape>$HOME/.config/neomutt/bin/search_mail.sh<enter><change-folder-readonly>~/.mail/search<enter>" \
macro index,pager \Cf "<shell-escape>$HOME/.config/neomutt/bin/search_mail.sh<enter><change-folder-readonly>$HOME/.local/share/mails/search<enter>" \
"test"
# macro index,pager \Cf "<shell-escape>mu find --clearlinks --format=links --linksdir=~/.mail/search " \
# macro index,pager \Cf "<shell-escape>mu find --clearlinks --format=links --linksdir=$HOME/.local/share/mails/search " \
# "mu find"
macro index,pager gf "<change-folder-readonly>~/.mail/search<enter>" \
macro index,pager gf "<change-folder-readonly>$HOME/.local/share/mails/search<enter>" \
"mu find results"
#+end_src
@@ -782,7 +782,7 @@ message_to = message['to']
# Ask emacsclient to save a link to the message
subprocess.Popen([
'emacsclient',
f'org-protocol://capture?template=ps&url={message_id}&title={subject}&body={message_to}'
f'org-protocol://capture?template=pm&url={message_id}&title={subject}&body={message_to}'
])
#+end_src
@@ -853,13 +853,13 @@ bind editor <Tab> complete-query
** Paths
#+BEGIN_SRC conf
set folder = ~/.mail # mail location
set alias_file = ~/.config/neomutt/alias # where to store aliases
set header_cache = ~/.config/neomutt/cache/headers # where to store headers
set message_cachedir = ~/.config/neomutt/cache/bodies # where to store bodies
set certificate_file = ~/.config/neomutt/certificates # where to store certs
set mailcap_path = ~/.config/neomutt/mailcap # entries for filetypes
set tmpdir = ~/.config/neomutt/temp # where to keep temp files
set folder = $HOME/.local/share/mails # mail location
set alias_file = $HOME/.config/neomutt/alias # where to store aliases
set header_cache = $HOME/.config/neomutt/cache/headers # where to store headers
set message_cachedir = $HOME/.config/neomutt/cache/bodies # where to store bodies
set certificate_file = $HOME/.config/neomutt/certificates # where to store certs
set mailcap_path = $HOME/.config/neomutt/mailcap # entries for filetypes
set tmpdir = $HOME/.config/neomutt/temp # where to keep temp files
#+END_SRC
** Print
@@ -875,8 +875,8 @@ set spoolfile = "+esrf/Inbox" # Default inbox
set realname = "Dehaeze Thomas"
set from = "thomas.dehaeze@esrf.fr"
folder-hook gmail/* source ~/.config/neomutt/accounts/gmail
folder-hook esrf/* source ~/.config/neomutt/accounts/esrf
folder-hook gmail/* source $HOME/.config/neomutt/accounts/gmail
folder-hook esrf/* source $HOME/.config/neomutt/accounts/esrf
macro index,pager ge "<change-folder>+esrf/Inbox<enter>" "go to inbox"
macro index,pager gm "<change-folder>+gmail/Inbox<enter>" "go to inbox"
@@ -886,7 +886,7 @@ macro index,pager gm "<change-folder>+gmail/Inbox<enter>" "go to inbox"
**** Configuration
#+begin_src conf :tangle ~/.config/neomutt/accounts/gmail :comments none
set from = "dehaeze.thomas@gmail.com"
set sendmail = "~/.config/neomutt/bin/send_mail.sh gmail"
set sendmail = "$HOME/.config/neomutt/bin/send_mail.sh gmail"
# Other special folders.
set mbox = "+gmail/Archive" # Archive Box
@@ -894,7 +894,7 @@ set postponed = "+gmail/Drafts"
unset record # Don't copy send message to Sent folder: Gmail does that for us
set signature = "~/.config/neomutt/accounts/gmail.signature"
set signature = "$HOME/.config/neomutt/accounts/gmail.signature"
macro index,pager d \
"<save-message>+gmail/Archive<enter>" \
@@ -917,14 +917,14 @@ This empty code block is used to add a new line after signature
**** Configuration
#+begin_src conf :tangle ~/.config/neomutt/accounts/esrf :comments none
set from = "thomas.dehaeze@esrf.fr"
set sendmail = "~/.config/neomutt/bin/send_mail.sh esrf"
set sendmail = "$HOME/.config/neomutt/bin/send_mail.sh esrf"
# Other special folders.
set mbox = "+esrf/Archive"
set record = "+esrf/Sent"
set postponed = "+esrf/Drafts"
set signature = "~/.config/neomutt/accounts/esrf.signature"
set signature = "$HOME/.config/neomutt/accounts/esrf.signature"
macro index,pager d \
"<save-message>+esrf/Archive<enter>" \
@@ -1091,22 +1091,23 @@ set sidebar_format = '%D %* %?N?[%N]?'
# path - mailbox path
# unsorted - do not sort the mailboxes
set sidebar_sort_method = 'unsorted'
set sort_browser = 'unsorted'
#+END_SRC
*** Mailboxes to show in the sidebar.
#+BEGIN_SRC conf
named-mailboxes " Search" =search
named-mailboxes " Search" =search
named-mailboxes " GMAIL" =empty/gmail
named-mailboxes "  Inbox" =gmail/Inbox
named-mailboxes "  Sent" =gmail/Sent
named-mailboxes "  Drafts" =gmail/Drafts
named-mailboxes " Archive" =gmail/Archive
named-mailboxes " Archive" =gmail/Archive
named-mailboxes "  Trash" =gmail/Trash
named-mailboxes " ESRF" =empty/esrf
named-mailboxes "  Inbox" =esrf/Inbox
named-mailboxes "  Sent" =esrf/Sent
named-mailboxes "  Drafts" =esrf/Drafts
named-mailboxes " Archive" =esrf/Archive
named-mailboxes " Archive" =esrf/Archive
named-mailboxes "  Trash" =esrf/Trash
#+END_SRC
@@ -1145,16 +1146,16 @@ set abort_noattach_regex = "\\<(attach(|ed|ments?)|(attaché|attachés|attache|a
*** Search Mail
#+begin_src bash :tangle ~/.config/neomutt/bin/search_mail.sh
arg_subject=$(rofi -p "Search" -dmenu)
arg_subject=$(rofi -p "Contains" -dmenu)
arg_from=$(rofi -p "From" -dmenu)
if [ ! -z "$arg_from" ]; then
arg_from="from:${arg_from}"
arg_from="from:/.*${arg_from}.*/"
fi
arg_to=$(rofi -p "To" -dmenu)
if [ ! -z "$arg_to" ]; then
arg_to="to:${arg_to}"
arg_to="to:/.*${arg_to}.*/"
fi
arg_mime=$(echo -e "\napplication/pdf\nimage/*\nvideo/*" | rofi -i -p "Mime" -dmenu)
@@ -1162,16 +1163,16 @@ if [ ! -z "$arg_mime" ]; then
arg_mime="mime:${arg_mime}"
fi
mu find --clearlinks --format=links --linksdir=~/.mail/search "${arg_from} ${arg_to} ${arg_mime} ${arg_subject}"
mu find --clearlinks --format=links --linksdir=$HOME/.local/share/mails/search "${arg_from} ${arg_to} ${arg_mime} ${arg_subject}"
#+end_src
*** Send Mail Script
*** Sync "Send Mail" Script
#+begin_src bash :tangle ~/.config/neomutt/bin/send_mail.sh
msmtp -a $1 ${@:2} && \
if [ $TMUX ]; then
tmux split -v -l 1 mbsync $1-Sent && tmux select-pane -U
tmux split -v -l 1 mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc $1-Sent && tmux select-pane -U
else
mbsync $1-Sent
mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc $1-Sent
fi
#+end_src
@@ -1184,6 +1185,15 @@ else
fi
#+end_src
*** Sync ESRF Mail Script
#+begin_src bash :tangle ~/.config/neomutt/bin/get_new_esrf_mail.sh
if [ $TMUX ]; then
tmux split -v -l 1 mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc esrf && tmux select-pane -U
else
mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc esrf
fi
#+end_src
*** Openfile Scripts
#+begin_src bash :tangle ~/.config/neomutt/bin/openfile.sh
base=$(basename "$1")