From 4052357e021085bc1c761108446ee09a778ade15 Mon Sep 17 00:00:00 2001 From: Mohammad Reza Karimi Date: Sun, 18 Jan 2026 01:33:29 -0500 Subject: big updates --- aerc/dot-config/aerc/accounts.conf | 18 ++- aerc/dot-config/aerc/aerc.conf | 31 +++-- aerc/dot-config/aerc/filters/html | 53 ++++++++ aerc/dot-config/aerc/filters/html-unsafe | 1 + aerc/dot-config/aerc/stylesets/default_nicer | 37 ++++- aerc/dot-config/aerc/templates/forward_as_body | 11 +- aerc/dot-config/aerc/templates/quoted_reply | 2 +- alacritty/dot-config/alacritty/alacritty.toml | 11 +- bash/dot-config/bash/functions.bash | 5 + cal/dot-config/khal/config | 97 +++++++++++++ cal/dot-config/khard/khard.conf | 17 +++ cal/dot-config/vdirsyncer/config | 61 +++++++++ email/dot-config/imapnotify/gmail.yaml | 15 +++ email/dot-config/imapnotify/mit.yaml | 2 +- email/dot-config/isyncrc | 43 ++++++ email/dot-config/maildir-rank-addr/config | 11 ++ email/dot-config/msmtp/config | 19 ++- email/dot-config/notmuch/default/config | 23 +--- email/dot-config/notmuch/default/hooks/post-new | 18 ++- email/dot-config/oama/config.yaml | 3 + email/dot-config/systemd/user/goimap.service | 15 --- email/dot-config/systemd/user/goimap@.service | 15 +++ .../fontconfig/conf.d/52-default-fonts.conf | 2 +- niri/dot-config/niri/config.kdl | 3 + qute/dot-config/qutebrowser/config.py | 15 ++- .../qutebrowser/greasemonkey/whatsapp.js | 3 + qute/dot-config/qutebrowser/startpage.html | 2 +- scripts/dot-local/bin/dot-editorconfig | 6 +- scripts/dot-local/bin/mailsync | 150 +++++++++++++++------ waybar/dot-config/waybar/config.jsonc | 26 ++-- waybar/dot-config/waybar/style.css | 17 ++- wayland-basics/dot-config/mako/config | 2 +- .../dot-config/systemd/user/swaybg.service | 2 +- .../dot-local/share/applications/mail.desktop | 5 +- 34 files changed, 594 insertions(+), 147 deletions(-) create mode 100755 aerc/dot-config/aerc/filters/html create mode 120000 aerc/dot-config/aerc/filters/html-unsafe create mode 100644 cal/dot-config/khal/config create mode 100644 cal/dot-config/khard/khard.conf create mode 100644 cal/dot-config/vdirsyncer/config create mode 100644 email/dot-config/imapnotify/gmail.yaml create mode 100644 email/dot-config/maildir-rank-addr/config delete mode 100644 email/dot-config/systemd/user/goimap.service create mode 100644 email/dot-config/systemd/user/goimap@.service diff --git a/aerc/dot-config/aerc/accounts.conf b/aerc/dot-config/aerc/accounts.conf index 1e227f1..7a2fc27 100644 --- a/aerc/dot-config/aerc/accounts.conf +++ b/aerc/dot-config/aerc/accounts.conf @@ -1,6 +1,6 @@ [MIT] source = maildir:///home/moreka/.local/share/mail/mit -outgoing = /usr/bin/msmtp +outgoing = /usr/bin/sendmail default = INBOX from = Mohammad Reza Karimi copy-to = Sent @@ -8,8 +8,24 @@ postpone = Drafts trash = Deleted archive = Archive aliases = moreka@MIT.EDU,MOREKA@MIT.EDU +cache-headers = true check-mail-cmd = mbsync mit check-mail-timeout = 20s folders-sort = INBOX,Sent,Drafts,Archive + + +[Gmail] +source = maildir:///home/moreka/.local/share/mail/m.r.karimi.j@gmail.com +outgoing = /usr/bin/sendmail +default = INBOX +from = Mohammad Reza Karimi +copy-to = Sent +postpone = Drafts +cache-headers = true + +check-mail-cmd = mbsync m.r.karimi.j@gmail.com +check-mail-timeout = 60s + +folders-sort = INBOX,Sent diff --git a/aerc/dot-config/aerc/aerc.conf b/aerc/dot-config/aerc/aerc.conf index 7f0d08d..4e3b133 100644 --- a/aerc/dot-config/aerc/aerc.conf +++ b/aerc/dot-config/aerc/aerc.conf @@ -1,16 +1,16 @@ +# vim: ft=confini + [general] default-save-path=~/Downloads pgp-provider=gpg unsafe-accounts-conf=false log-file=~/.cache/aerc.log -log-level=warn +log-level=error term=alacritty enable-osc8=true -# default-menu-cmd=ranger --choosefiles=%f default-menu-cmd=fzf --multi [ui] -# # Describes the format for each row in a mailbox view. This is a comma # separated list of column names with an optional align and width suffix. After # the column name, one of the '<' (left), ':' (center) or '>' (right) alignment @@ -51,7 +51,7 @@ this-year-time-format=Jan 02 message-view-timestamp-format=2006 Jan 02, 15:04 GMT-0700 sidebar-width=14 # message-list-split=horizontal 20 -mouse-enabled=true +mouse-enabled=false new-message-bell=false dirlist-delay=200ms @@ -88,13 +88,25 @@ column-name = {{if .To}}{{index (.To | names) 0}}{{else}} malformed email{{end}} column-flags = {{.Flags | join " "}} [statusline] +status-columns = account<=,3973e022e932<=,folder<=,status<=,cbe5cfdf7c21<=,cwd<=,e3b0c44298fc<*,e3b0c44298fc>=,tray>= +column-cwd = {{cwd}} +column-e3b0c44298fc = +column-tray = {{.TrayInfo}} +column-account = [{{.Account}} +column-3973e022e932 = - +column-folder = {{.Folder}}] +column-status = {{.StatusInfo}} +column-cbe5cfdf7c21 = | +display-mode=text [viewer] pager=less -Rc alternatives=text/plain,text/html show-headers=false -header-layout=From,To,Cc,Bcc,Date,Subject -always-show-mime=false +header-layout=From,Sender,To,Cc,Bcc,Date,Subject,Labels +always-show-mime=true +max-mime-height=8 +parse-http-links=true [compose] editor=nvim @@ -102,7 +114,10 @@ header-layout=To,From,Subject edit-headers=false focus-body=false -address-book-cmd=grep -i -m 100 %s /home/moreka/.cache/maildir-rank-addr/addressbook.tsv +address-book-cmd=addr-book-combine \ + -c "rg -F -i -- '%s' ~/.cache/maildir-rank-addr/addressbook.tsv" \ + -c "khard email --remove-first-line --parsable '%s' | cut -f 1,2" + file-picker-cmd=lf -selection-path '%f' @@ -149,7 +164,7 @@ text/html=pandoc -f markdown -t html --standalone # against (non-case-sensitive) and a comma, e.g. subject,text will match a # subject which contains "text". Use header,~regex to match against a regex. # -text/plain=colorize +text/plain=wrap -w 100 | colorize text/calendar=calendar message/delivery-status=colorize message/rfc822=colorize diff --git a/aerc/dot-config/aerc/filters/html b/aerc/dot-config/aerc/filters/html new file mode 100755 index 0000000..841131e --- /dev/null +++ b/aerc/dot-config/aerc/filters/html @@ -0,0 +1,53 @@ +#!/bin/sh + +# aerc filter to view HTML emails with w3m. +# +# Networking access will be disabled unless the script is named 'html-unsafe'. +# +# If stdout is connected to a TTY, the interactive pager of w3m will be enabled. + +set -- w3m \ + -I UTF-8 -O UTF-8 -T text/html \ + -s -graph \ + -o fold_textarea=true \ + -o fold_line=true \ + -o decode_url=true \ + -o display_link=true \ + "$@" + +if [ -t 1 ]; then + # stdout is connected to a terminal, enable interactive mode + set -- "$@" -o display_borders=true + + if w3m --help 2>&1 | head -n1 | grep -q "options.*image"; then + # display inline images if support is enabled + set -- "$@" -o display_image=true -o auto_image=true + fi +else + # stdout is connected to a pager, dump output without interaction + set -- "$@" -cols 100 -dump -o disable_center=true +fi + +if ! [ "$(basename $0)" = "html-unsafe" ]; then + # attempt network isolation to prevent any phoning home by rendered emails + set -- "$@" -o no_cache=true -o use_cookie=false + + if command -v unshare >/dev/null 2>&1; then + # run the command in a separate network namespace + set -- unshare --map-root-user --net "$@" + elif command -v socksify >/dev/null 2>&1; then + # if socksify (from dante-utils) is available, use it + export SOCKS_SERVER="127.0.0.1:1" + set -- socksify "$@" + else + # best effort, use an invalid address as http proxy + set -- "$@" -o use_proxy=true + for opt in http_proxy https_proxy gopher_proxy ftp_proxy; do + if w3m -o | grep -q $opt; then + set -- "$@" -o $opt='127.0.0.1:1' + fi + done + fi +fi + +sed 's/ / /g' | exec "$@" diff --git a/aerc/dot-config/aerc/filters/html-unsafe b/aerc/dot-config/aerc/filters/html-unsafe new file mode 120000 index 0000000..724f4d4 --- /dev/null +++ b/aerc/dot-config/aerc/filters/html-unsafe @@ -0,0 +1 @@ +html \ No newline at end of file diff --git a/aerc/dot-config/aerc/stylesets/default_nicer b/aerc/dot-config/aerc/stylesets/default_nicer index 301a028..57d02b1 100644 --- a/aerc/dot-config/aerc/stylesets/default_nicer +++ b/aerc/dot-config/aerc/stylesets/default_nicer @@ -1,23 +1,48 @@ -# vim: ft=dosini +# vim: ft=dosini commentstring=#\ %s # # aerc default styleset (with changes) # # Uncomment these two lines to reset all attributes (except in the [viewer] # section) and start from scratch. -#*.default = true -#*.normal = true +# *.default = true +# *.normal = true + +# *.selected.reverse = toggle + +title.reverse = true +header.bold = true + +*error.bold = true +error.fg = red +warning.fg = yellow +success.fg = green + +# statusline*.default = true +# statusline_default.reverse = true +# statusline_error.fg = red +# statusline_error.reverse = true + +tab.bg = #444444 *.selected.bg = 12 *.selected.fg = 0 *.selected.bold = false +msglist.selected.bg = #87af87 +msglist_unread.bold = true +msglist*.fg = #aaaaaa +msglist_unread.fg = #cccccc +msglist_deleted.dim = true +msglist_marked.bg = yellow +msglist_marked.fg = 0 + tab.selected.fg = #ffffff tab.selected.bg = #1640b0 -tab.selected.bold = false +tab.selected.bold = true -dirlist*.selected.bg = 11 -dirlist*.selected.fg = 0 +dirlist*.selected.bg = 0 +dirlist*.selected.fg = #d77575 dirlist*.selected.bold = true #statusline_*.dim = true diff --git a/aerc/dot-config/aerc/templates/forward_as_body b/aerc/dot-config/aerc/templates/forward_as_body index d4c9dbf..ff9076a 100644 --- a/aerc/dot-config/aerc/templates/forward_as_body +++ b/aerc/dot-config/aerc/templates/forward_as_body @@ -1,6 +1,7 @@ -Forwarded message from {{.OriginalFrom | names | join ", "}} on {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 15:04 MST"}}: -{{.OriginalText}} -{{- with .Signature }} - -{{.}} +Forwarded message from {{(index .OriginalFrom 0).Name}} <{{(index .OriginalFrom 0).Address}}> on {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 15:04 MST"}}: +{{ if eq .OriginalMIMEType "text/html" -}} +{{- exec `html` .OriginalText -}} +{{- else -}} +{{- .OriginalText -}} {{- end }} +{{.Signature}} diff --git a/aerc/dot-config/aerc/templates/quoted_reply b/aerc/dot-config/aerc/templates/quoted_reply index 27a3892..7b176d0 100644 --- a/aerc/dot-config/aerc/templates/quoted_reply +++ b/aerc/dot-config/aerc/templates/quoted_reply @@ -1,4 +1,4 @@ -On {{dateFormat (.OriginalDate | toLocal) "Mon Jan 2, 2006 at 15:04 MST"}}, {{.OriginalFrom | names | join ", "}} wrote: +On {{dateFormat (.OriginalDate | toLocal) "Mon Jan 2, 2006 at 15:04 MST"}}, {{(index .OriginalFrom 0).Name}} <{{(index .OriginalFrom 0).Address}}> wrote: {{ if eq .OriginalMIMEType "text/html" -}} {{- exec `html` .OriginalText | trimSignature | quote -}} {{- else -}} diff --git a/alacritty/dot-config/alacritty/alacritty.toml b/alacritty/dot-config/alacritty/alacritty.toml index fead41a..6f6af7d 100644 --- a/alacritty/dot-config/alacritty/alacritty.toml +++ b/alacritty/dot-config/alacritty/alacritty.toml @@ -2,12 +2,15 @@ live_config_reload = true [font] -normal = { family = "Dejavu Sans Mono", style = "Book" } +# normal = { family = "Dejavu Sans Mono", style = "Book" } +normal = { family = "Liberation Mono", style = "Book" } size = 12 [window] padding = { x = 3, y = 3 } +dynamic_padding = true dynamic_title = true +opacity = 1.0 [scrolling] history = 5000 @@ -32,9 +35,5 @@ bindings = [ { key = "K", mods = "Alt", mode = "~Vi", action = "ScrollLineUp" }, { key = "F11", action = "ToggleFullscreen" }, { key = "N", mods = "Control|Shift", mode = "~Vi", action = "CreateNewWindow" }, -] - -[hints] -enabled = [ - { regex = "^.*\\.md", hyperlinks = true, command = "alanvim", binding = { key = "T", mods = "Alt", mode = "~Vi" } } + { key = "P", mods = "Alt|Shift", mode = "~Vi", command = "toggle-alacritty-font-size" }, ] diff --git a/bash/dot-config/bash/functions.bash b/bash/dot-config/bash/functions.bash index 33bfd67..a8c0a65 100644 --- a/bash/dot-config/bash/functions.bash +++ b/bash/dot-config/bash/functions.bash @@ -42,6 +42,11 @@ pS() pacman -Slq | fzf --multi --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S } +paruS() +{ + paru -Slq | fzf --multi --preview 'paru -Si {1}' | xargs -ro paru -S +} + yayS() { yay -Slq | fzf --multi --preview 'yay -Si {1}' | xargs -ro yay -S diff --git a/cal/dot-config/khal/config b/cal/dot-config/khal/config new file mode 100644 index 0000000..b2f5c2f --- /dev/null +++ b/cal/dot-config/khal/config @@ -0,0 +1,97 @@ +# vim: ft=dosini commentstring=#\ %s + +[calendars] + +[[google-basic]] +path = ~/.local/share/vdirsyncer/calendars/google/m.r.karimi.j@gmail.com/ +color = dark blue + +[[google-mit]] +path = ~/.local/share/vdirsyncer/calendars/google/e226ae4bc148235546e47f7f333b825b35642cd08018edd849c35840cc103167@group.calendar.google.com/ +color = dark red + +[[google-holiday-iran]] +path = ~/.local/share/vdirsyncer/calendars/google/cln2sqbi4dk6ur39chgnig37e9nnas1eeon66obccln68obi5pjmurr7dhiisorfdk@virtual +color = "#aaaaaa" + +[[google-holiday-switzerland]] +path = ~/.local/share/vdirsyncer/calendars/google/cln2sor84dk6ur39chgnig37e9nnas1eeon66obccln68obi5pjmurr7dhiisorfdk@virtual +color = "#aaaaaa" + +[[google-holiday-us]] +path = ~/.local/share/vdirsyncer/calendars/google/cln2stbjc4hmgrrcd5i62ua0ctp6utbg5pr2sor1dhimsp31e8n6errfctm6abj3dtmg@virtual +color = "#aaaaaa" + +[[moreka]] +path = ~/.local/share/vdirsyncer/calendars/moreka.cc/b3f68fb7-93d3-2129-5b31-bb490d4bc387/ +color = dark magenta + +[locale] +timeformat = %H:%M +dateformat = %d.%m.%Y +longdateformat = %d.%m.%Y +datetimeformat = %d.%m.%Y %H:%M +longdatetimeformat = %d.%m.%Y %H:%M + +[default] +default_calendar = moreka +highlight_event_days = True +timedelta = 7d + +[view] +frame = top + +[highlight_days] +multiple = yellow + +[palette] +# 1. Foreground color and settings for 16-color (normal) mode +# 2. Background color for normal mode +# 3. Settings for monochrome mode (optional) +# 4. Foreground color and settings for 88 and 256-color modes (optional) +# 5. Background color for 88 and 256-color modes (optional) + +header = 'light red', 'black' +# ('footer', 'white', 'black'), +'line header' = 'black', 'white', 'bold', '#ff0000', '' +# ('alt header', 'white', '', 'bold'), +# ('bright', 'dark blue', 'white', 'bold,standout'), +# list = '', '' +# list focused = 'white', 'light blue', 'bold' +edit = 'black', 'white', '', '#cccccc', '#333333' +edit focus = 'white', 'light red', 'bold' +# ('button', 'black', 'dark cyan'), +# ('button focused', 'white', 'light blue', 'bold'), +# +# ('reveal focus', 'black', 'light gray'), +# ('today focus', 'white', 'dark magenta'), +# ('today', 'dark gray', 'dark green',), +# +date header = 'white', 'black', '', '#cccccc,underline', 'black' +date header focused = 'dark gray', 'black', 'bold', '#cccccc,bold', '#444444' +date header selected = 'dark gray', 'black', '', '#cccccc,bold', '#333333' + +# ('date header', '', 'white'), +# ('date header focused', 'white', 'dark gray', 'bold,standout'), +# ('date header selected', 'dark gray', 'light cyan'), + +# ('dayname', 'light gray', ''), +# ('monthname', 'light gray', ''), +# ('weeknumber_right', 'light gray', ''), +# ('alert', 'white', 'dark red'), +# ('mark', 'white', 'dark green'), +# ('frame', 'white', 'black'), +# ('frame focus', 'light red', 'black'), +# ('frame focus color', 'dark blue', 'black'), +# ('frame focus top', 'dark magenta', 'black'), +# +# ('eventcolumn', '', '', ''), +# ('eventcolumn focus', '', '', ''), +# ('calendar', '', '', ''), +# ('calendar focus', '', '', ''), +# +# ('editbx', 'light gray', 'dark blue'), +# ('editcp', 'black', 'light gray', 'standout'), +# ('popupbg', 'white', 'black', 'bold'), +# ('popupper', 'white', 'dark cyan'), +# ('caption', 'white', '', 'bold'), diff --git a/cal/dot-config/khard/khard.conf b/cal/dot-config/khard/khard.conf new file mode 100644 index 0000000..9ab1870 --- /dev/null +++ b/cal/dot-config/khard/khard.conf @@ -0,0 +1,17 @@ +# vim: ft=confini + +[addressbooks] +[[gmail]] +path = ~/.local/share/vdirsyncer/contacts/google/default/ + +[general] +default_action = list +editor = nvim, -i, NONE +merge_editor = vimdiff + +[contact table] +display = formatted_name +sort = last_name +localize_dates = yes +preferred_email_address_type = pref, work, home +show_kinds = no diff --git a/cal/dot-config/vdirsyncer/config b/cal/dot-config/vdirsyncer/config new file mode 100644 index 0000000..abdc264 --- /dev/null +++ b/cal/dot-config/vdirsyncer/config @@ -0,0 +1,61 @@ +# vim: ft=confini + +[general] +status_path = "~/.local/state/vdirsyncer/" + +##### Google Contacts ##### + +[pair gmail_contacts] +a = "gmail_contacts_local" +b = "gmail_contacts_remote" +collections = ["from a", "from b"] +metadata = ["displayname"] + +[storage gmail_contacts_local] +type = "filesystem" +path = "~/.local/share/vdirsyncer/contacts/google" +fileext = ".vcf" + +[storage gmail_contacts_remote] +type = "google_contacts" +token_file = "~/.local/state/vdirsyncer/googlecard-token" +client_id.fetch = ["command", "pass", "show", "google/oauth/clientid"] +client_secret.fetch = ["command", "pass", "show", "google/oauth/clientsecret"] + +##### Google Calendar ##### + +[pair googlecalendars] +a = "googlecaldav_local" +b = "googlecaldav_remote" +metadata = ["color", "displayname", "description", "order"] +collections = ["from a", "from b"] + +[storage googlecaldav_local] +type = "filesystem" +path = "~/.local/share/vdirsyncer/calendars/google" +fileext = ".ics" + +[storage googlecaldav_remote] +type = "google_calendar" +client_id.fetch = ["command", "pass", "show", "google/oauth/clientid"] +client_secret.fetch = ["command", "pass", "show", "google/oauth/clientsecret"] +token_file = "~/.local/state/vdirsyncer/googlecal-token" + +##### Moreka.cc Calendar ##### + +[pair moreka_calendar] +a = "moreka_calendar_local" +b = "moreka_calendar_remote" +collections = ["from a", "from b"] +metadata = ["displayname"] + +[storage moreka_calendar_local] +type = "filesystem" +path = "~/.local/share/vdirsyncer/calendars/moreka.cc" +fileext = ".ics" + +[storage moreka_calendar_remote] +type = "caldav" +url = "https://dav.moreka.cc/moreka/b3f68fb7-93d3-2129-5b31-bb490d4bc387/" +username = "moreka" +password.fetch = ["command", "pass", "show", "dav-moreka-cc"] diff --git a/email/dot-config/imapnotify/gmail.yaml b/email/dot-config/imapnotify/gmail.yaml new file mode 100644 index 0000000..20cc4a0 --- /dev/null +++ b/email/dot-config/imapnotify/gmail.yaml @@ -0,0 +1,15 @@ +configurations: + - + host: imap.gmail.com + port: 993 + tls: true + tlsOptions: + rejectUnauthorized: false + starttls: false + username: m.r.karimi.j@gmail.com + passwordCmd: 'pass api-keys/google-app-password' + onNewMail: 'mailsync m.r.karimi.j@gmail.com' + onNewMailPost: SKIP + boxes: + - + mailbox: INBOX diff --git a/email/dot-config/imapnotify/mit.yaml b/email/dot-config/imapnotify/mit.yaml index 6aabeae..d850ba0 100644 --- a/email/dot-config/imapnotify/mit.yaml +++ b/email/dot-config/imapnotify/mit.yaml @@ -9,7 +9,7 @@ configurations: xoAuth2: true username: moreka@mit.edu passwordCmd: 'oama access moreka@mit.edu' - onNewMail: 'mailsync' + onNewMail: 'mailsync mit' onNewMailPost: SKIP boxes: - diff --git a/email/dot-config/isyncrc b/email/dot-config/isyncrc index e57ece5..58b4af2 100644 --- a/email/dot-config/isyncrc +++ b/email/dot-config/isyncrc @@ -48,3 +48,46 @@ Channel sync-mit-default Channel sync-mit-sent Channel sync-mit-deleted Channel sync-mit-junk + +IMAPAccount gmail-mrkarimij +Host imap.gmail.com +User m.r.karimi.j@gmail.com +PassCmd "oama access m.r.karimi.j@gmail.com" +TLSType IMAPS +CertificateFile /etc/ssl/certs/ca-certificates.crt +Timeout 360 + +IMAPStore gmail-mrkarimij-remote +Account gmail-mrkarimij + +MaildirStore gmail-mrkarimij-local +SubFolders Verbatim +Path /home/moreka/.local/share/mail/m.r.karimi.j@gmail.com/ +Inbox /home/moreka/.local/share/mail/m.r.karimi.j@gmail.com/INBOX + +Channel gmail-mrkarimij-inbox +Far :gmail-mrkarimij-remote:INBOX +Near :gmail-mrkarimij-local:INBOX +Create Near +Expunge Both +SyncState * +ExpireUnread no + +Channel gmail-mrkarimij-sent +Far :gmail-mrkarimij-remote:"[Gmail]/Sent Mail" +Near :gmail-mrkarimij-local:Sent +Create Near +Expunge Both +SyncState * + +Channel gmail-mrkarimij-drafts +Far :gmail-mrkarimij-remote:"[Gmail]/Drafts" +Near :gmail-mrkarimij-local:Drafts +Create Near +Expunge Both +SyncState * + +Group m.r.karimi.j@gmail.com +Channel gmail-mrkarimij-inbox +Channel gmail-mrkarimij-sent +Channel gmail-mrkarimij-drafts diff --git a/email/dot-config/maildir-rank-addr/config b/email/dot-config/maildir-rank-addr/config new file mode 100644 index 0000000..0ba5932 --- /dev/null +++ b/email/dot-config/maildir-rank-addr/config @@ -0,0 +1,11 @@ +# vim: ft=toml +maildir = "~/.local/share/mail/mit" +addresses = [ + "moreka@mit.edu", + "moreka@MIT.EDU", + "m.r.karimi.j@gmail.com", +] +addr-book-cmd = "khard email -p --remove-first-line" +addr-book-add-unmatched = true +outputpath = "~/.cache/maildir-rank-addr/addressbook.tsv" +template = "{{.Address}}\t{{.Name}}\t{{.NormalizedName}}" diff --git a/email/dot-config/msmtp/config b/email/dot-config/msmtp/config index e000852..02f21e4 100644 --- a/email/dot-config/msmtp/config +++ b/email/dot-config/msmtp/config @@ -1,14 +1,25 @@ defaults -auth on + tls on -tls_starttls off +logfile ~/.cache/msmtp.log account mit host outgoing.mit.edu port 465 +tls_starttls off +auth on from moreka@mit.edu user moreka -passwordeval "pass show mail/smtp" -logfile ~/.cache/msmtp.log +passwordeval pass show mail/smtp + +account gmail +host smtp.gmail.com +port 587 +auth oauthbearer +tls_starttls on +from m.r.karimi.j@gmail.com +user m.r.karimi.j@gmail.com +passwordeval oama access m.r.karimi.j@gmail.com +tls_trust_file /etc/ssl/certs/ca-certificates.crt account default : mit diff --git a/email/dot-config/notmuch/default/config b/email/dot-config/notmuch/default/config index eeacdcc..bfdbf65 100644 --- a/email/dot-config/notmuch/default/config +++ b/email/dot-config/notmuch/default/config @@ -6,33 +6,12 @@ name=Mohammad Reza Karimi primary_email=moreka@mit.edu [new] -tags=new +tags=inbox;unread; ignore=.mbsyncstate;.uidvalidity;.mbsyncstate.new;.mbsyncstate.lock [search] exclude_tags=deleted;spam -# Maildir compatibility configuration -# -# The following option is supported here: -# -# synchronize_flags Valid values are true and false. -# -# If true, then the following maildir flags (in message filenames) -# will be synchronized with the corresponding notmuch tags: -# -# Flag Tag -# ---- ------- -# D draft -# F flagged -# P passed -# R replied -# S unread (added when 'S' flag is not present) -# -# The "notmuch new" command will notice flag changes in filenames -# and update tags, while the "notmuch tag" and "notmuch restore" -# commands will notice tag changes and update flags in filenames - [maildir] synchronize_flags=true diff --git a/email/dot-config/notmuch/default/hooks/post-new b/email/dot-config/notmuch/default/hooks/post-new index 063888b..f03a5d1 100755 --- a/email/dot-config/notmuch/default/hooks/post-new +++ b/email/dot-config/notmuch/default/hooks/post-new @@ -1,10 +1,18 @@ #!/bin/sh -# remove "unread" from "replied" -notmuch tag -unread -new -- tag:replied +# tag emails in the Deleted folder as deleted +notmuch tag +deleted -unread -inbox -- folder:mit/Deleted + +# tag emails in the Deleted folder as deleted +notmuch tag +archived -unread -inbox -- folder:mit/Archive -# tag all "new" messages "inbox" and "unread" -notmuch tag +inbox +unread -new -- '(tag:new and folder:mit/INBOX)' +# tag emails in the Deleted folder as deleted +notmuch tag +sent -unread -inbox -- folder:mit/Sent +notmuch tag +sent -unread -inbox -- folder:m.r.karimi.j@gmail.com/Sent + +# remove "unread" from "replied" +notmuch tag -unread -- tag:replied # tag my replies as "sent" -notmuch tag -new -unread +sent -- '(from:"moreka@mit.edu*" not to:"moreka@mit.edu*" not tag:archived)' +notmuch tag -unread +sent -- '(from:"moreka@mit.edu*" not to:"moreka@mit.edu*" not to:"moreka@MIT.EDU*" not tag:archived)' +notmuch tag -unread +sent -- '(from:"m.r.karimi.j@gmail.com*" not to:"m.r.karimi.j@gmail.com*" not tag:archived)' diff --git a/email/dot-config/oama/config.yaml b/email/dot-config/oama/config.yaml index 7f68064..2b5ceb2 100644 --- a/email/dot-config/oama/config.yaml +++ b/email/dot-config/oama/config.yaml @@ -13,3 +13,6 @@ services: microsoft: client_id: 9e5f94bc-e8a4-4e73-b8be-63364c29d753 tenant: common + google: + client_id_cmd: pass show google/oauth/clientid + client_secret_cmd: pass show google/oauth/clientsecret diff --git a/email/dot-config/systemd/user/goimap.service b/email/dot-config/systemd/user/goimap.service deleted file mode 100644 index e908999..0000000 --- a/email/dot-config/systemd/user/goimap.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Execute scripts on IMAP mailbox changes -Documentation=https://gitlab.com/shackra/goimapnotify -PartOf=graphical-session.target -After=graphical-session.target -After=network-online.target - -[Service] -Type=simple -ExecStart=/usr/bin/goimapnotify -conf %h/.config/imapnotify/mit.yaml -Restart=always -RestartSec=300 - -[Install] -WantedBy=graphical-session.target diff --git a/email/dot-config/systemd/user/goimap@.service b/email/dot-config/systemd/user/goimap@.service new file mode 100644 index 0000000..157af79 --- /dev/null +++ b/email/dot-config/systemd/user/goimap@.service @@ -0,0 +1,15 @@ +[Unit] +Description=Execute scripts on IMAP mailbox changes +Documentation=https://gitlab.com/shackra/goimapnotify +PartOf=graphical-session.target +After=graphical-session.target +After=network-online.target + +[Service] +Type=simple +ExecStart=/usr/bin/goimapnotify -conf %h/.config/imapnotify/%i.yaml +Restart=always +RestartSec=300 + +[Install] +WantedBy=graphical-session.target diff --git a/fonts/dot-config/fontconfig/conf.d/52-default-fonts.conf b/fonts/dot-config/fontconfig/conf.d/52-default-fonts.conf index 625f63d..c278060 100644 --- a/fonts/dot-config/fontconfig/conf.d/52-default-fonts.conf +++ b/fonts/dot-config/fontconfig/conf.d/52-default-fonts.conf @@ -28,7 +28,7 @@ monospace - Hack + Liberation Mono Noto Color Emoji Symbols Nerd Font diff --git a/niri/dot-config/niri/config.kdl b/niri/dot-config/niri/config.kdl index 4afdfff..5758fd0 100644 --- a/niri/dot-config/niri/config.kdl +++ b/niri/dot-config/niri/config.kdl @@ -37,6 +37,7 @@ output "eDP-1" { layout { gaps 10 center-focused-column "never" + always-center-single-column preset-column-widths { proportion 0.33333 proportion 0.5 @@ -92,6 +93,7 @@ binds { Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; } Mod+X hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } Mod+B hotkey-overlay-title="Open browser" { spawn-sh "runapp -o qutebrowser"; } + Mod+M hotkey-overlay-title="Open mail" { spawn-sh "runapp -o -- alacritty -e aerc-mod"; } Mod+Shift+B { spawn "toggle-waybar"; } @@ -184,6 +186,7 @@ binds { Print { screenshot; } Ctrl+Print { screenshot-screen; } Alt+Print { screenshot-window; } + Mod+Print { spawn "colorpick"; } Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } diff --git a/qute/dot-config/qutebrowser/config.py b/qute/dot-config/qutebrowser/config.py index 8b6ce2c..feaf581 100644 --- a/qute/dot-config/qutebrowser/config.py +++ b/qute/dot-config/qutebrowser/config.py @@ -18,7 +18,7 @@ c.completion.open_categories = [ "filesystem", ] -c.new_instance_open_target = "tab-bg" +c.new_instance_open_target = "tab" c.tabs.show = "multiple" c.tabs.last_close = "close" @@ -63,11 +63,16 @@ config.bind( c.editor.command = ["alacritty", "-e", "nvim", "{file}", "-c", "normal {line}G{column}"] +# c.aliases.update( +# { +# "save-to-zotero": """jseval --quiet var d=document,s=d.createElement("script");s.src="https://www.zotero.org/bookmarklet/loader.js";(d.body?d.body:d.documentElement).appendChild(s);void(0);""", +# "zotero": "spawn --userscript qute-zotero", +# } +# ) + c.colors.statusbar.private.bg = "#CF87E8" c.colors.webpage.preferred_color_scheme = "dark" - -# c.colors.webpage.darkmode.enabled = True c.colors.webpage.darkmode.algorithm = "lightness-cielab" c.colors.webpage.darkmode.threshold.foreground = 150 c.colors.webpage.darkmode.threshold.background = 100 @@ -81,7 +86,9 @@ with config.pattern("*://*.slack.com/*") as p: p.content.unknown_url_scheme_policy = "allow-all" with config.pattern("*://accounts.google.com/*") as p: - p.content.headers.user_agent = "Mozilla/5.0 ({os_info}; rv:131.0) Gecko/20100101 Firefox/131.0" + p.content.headers.user_agent = ( + "Mozilla/5.0 ({os_info}; rv:131.0) Gecko/20100101 Firefox/131.0" + ) c.content.blocking.enabled = True c.content.blocking.method = "both" diff --git a/qute/dot-config/qutebrowser/greasemonkey/whatsapp.js b/qute/dot-config/qutebrowser/greasemonkey/whatsapp.js index a7c9a42..587b09a 100644 --- a/qute/dot-config/qutebrowser/greasemonkey/whatsapp.js +++ b/qute/dot-config/qutebrowser/greasemonkey/whatsapp.js @@ -20,6 +20,9 @@ span[dir="rtl"] { font-family: "Vazirmatn RD UI" !important; } + div[dir="rtl"] > span.quoted-mention { + font-family: "Vazirmatn RD UI" !important; + } footer p[dir="rtl"] span { font-family: "Vazirmatn RD UI" !important; }`; diff --git a/qute/dot-config/qutebrowser/startpage.html b/qute/dot-config/qutebrowser/startpage.html index 51b294b..bf53c0d 100644 --- a/qute/dot-config/qutebrowser/startpage.html +++ b/qute/dot-config/qutebrowser/startpage.html @@ -4,7 +4,7 @@ about:blank