Compare commits
8 Commits
4c6be29281
...
a972167702
Author | SHA1 | Date |
---|---|---|
coolneng | a972167702 | |
coolneng | 32747cb297 | |
coolneng | 306680061c | |
coolneng | 14bb704323 | |
coolneng | c21e219e51 | |
coolneng | 3fbe8f5437 | |
coolneng | db4ee8dec5 | |
coolneng | a7d445d802 |
|
@ -20,19 +20,5 @@ alias webtorrent "webtorrent -i -o /tmp/webtorrent --mpv --player-args='--sub-au
|
||||||
set PATH $PATH $HOME/.emacs.d/bin
|
set PATH $PATH $HOME/.emacs.d/bin
|
||||||
set PATH $PATH $HOME/.local/share/scripts
|
set PATH $PATH $HOME/.local/share/scripts
|
||||||
|
|
||||||
# fff settings
|
|
||||||
## colors [0-9]
|
|
||||||
set -x FFF_COL1 4
|
|
||||||
set -x FFF_COL2 8
|
|
||||||
# favourites
|
|
||||||
set -x FFF_FAV1 $HOME/Documents/Uni
|
|
||||||
set -x FFF_FAV2 $HOME/Documents/Papers
|
|
||||||
set -x FFF_FAV3 $HOME/Documents/Books/Academic
|
|
||||||
set -x FFF_FAV4 $HOME/Documents/Education
|
|
||||||
# keybindings
|
|
||||||
set -x FFF_KEY_MOVE off
|
|
||||||
set -x FFF_KEY_MOVE_ALL off
|
|
||||||
|
|
||||||
|
|
||||||
# Set up direnv
|
# Set up direnv
|
||||||
eval (direnv hook fish)
|
eval (direnv hook fish)
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
signingkey = 9893DA236405AF57
|
signingkey = 9893DA236405AF57
|
||||||
[core]
|
[core]
|
||||||
excludesfile = /home/coolneng/.config/git/global_gitignore
|
excludesfile = /home/coolneng/.config/git/global_gitignore
|
||||||
pager = delta
|
|
||||||
[credential]
|
[credential]
|
||||||
helper = !pass-git-helper $@
|
helper = !pass-git-helper $@
|
||||||
[commit]
|
[commit]
|
||||||
|
@ -18,13 +17,11 @@
|
||||||
[filter "git-ignore-line.sh"]
|
[filter "git-ignore-line.sh"]
|
||||||
clean = /home/coolneng/.dotfiles/scripts/.local/share/scripts/git-ignore-line.sh
|
clean = /home/coolneng/.dotfiles/scripts/.local/share/scripts/git-ignore-line.sh
|
||||||
smudge = cat
|
smudge = cat
|
||||||
[interactive]
|
|
||||||
diffFilter = delta --color-only
|
|
||||||
[add.interactive]
|
[add.interactive]
|
||||||
useBuiltin = false # required for git 2.37.0
|
useBuiltin = false # required for git 2.37.0
|
||||||
[delta]
|
|
||||||
navigate = true # use n and N to move between diff sections
|
|
||||||
[merge]
|
[merge]
|
||||||
conflictstyle = diff3
|
conflictstyle = diff3
|
||||||
[diff]
|
[diff]
|
||||||
colorMoved = default
|
colorMoved = default
|
||||||
|
[add.interactive]
|
||||||
|
useBuiltin = false # required for git 2.37.0
|
||||||
|
|
|
@ -18,6 +18,7 @@ auto
|
||||||
# Python
|
# Python
|
||||||
.mypy_cache
|
.mypy_cache
|
||||||
__pycache__
|
__pycache__
|
||||||
|
.ipynb_checkpoints
|
||||||
# Dev environment with Nix
|
# Dev environment with Nix
|
||||||
.envrc
|
.envrc
|
||||||
.direnv
|
.direnv
|
||||||
|
|
|
@ -7,18 +7,8 @@
|
||||||
},
|
},
|
||||||
"username": "akasroua@disroot.org",
|
"username": "akasroua@disroot.org",
|
||||||
"passwordCmd": "pass mail/disroot",
|
"passwordCmd": "pass mail/disroot",
|
||||||
"onNewMail": "mbsync disroot",
|
"onNewMail": "~/.local/share/scripts/mail-sync disroot",
|
||||||
"onNewMailPost": "mu index --lazy-check",
|
|
||||||
"boxes": [
|
"boxes": [
|
||||||
"INBOX",
|
"INBOX"
|
||||||
"Sent",
|
|
||||||
"Trash",
|
|
||||||
"Archive",
|
|
||||||
"Junk",
|
|
||||||
"Bookings",
|
|
||||||
"Buying",
|
|
||||||
"Services",
|
|
||||||
"SMART",
|
|
||||||
"Travel"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,13 +7,8 @@
|
||||||
},
|
},
|
||||||
"username": "akasroua@gmail.com",
|
"username": "akasroua@gmail.com",
|
||||||
"passwordCmd": "pass mail/gmail",
|
"passwordCmd": "pass mail/gmail",
|
||||||
"onNewMail": "mbsync gmail",
|
"onNewMail": "~/.local/share/scripts/mail-sync gmail",
|
||||||
"onNewMailPost": "mu index --lazy-check",
|
|
||||||
"boxes": [
|
"boxes": [
|
||||||
"INBOX",
|
"INBOX"
|
||||||
"[Gmail]/Sent Mail",
|
|
||||||
"[Gmail]/Bin",
|
|
||||||
"[Gmail]/Spam",
|
|
||||||
"[Gmail]/All Mail"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,13 +8,8 @@
|
||||||
"username": "amin.kasrouaouam@ugent.be",
|
"username": "amin.kasrouaouam@ugent.be",
|
||||||
"passwordCmd": "/home/coolneng/.local/share/scripts/mutt_oauth2.py /home/coolneng/.cache/tokenfile",
|
"passwordCmd": "/home/coolneng/.local/share/scripts/mutt_oauth2.py /home/coolneng/.cache/tokenfile",
|
||||||
"xoauth2": true,
|
"xoauth2": true,
|
||||||
"onNewMail": "mbsync ugent",
|
"onNewMail": "~/.local/share/scripts/mail-sync ugent",
|
||||||
"onNewMailPost": "mu index --lazy-check",
|
|
||||||
"boxes": [
|
"boxes": [
|
||||||
"INBOX",
|
"INBOX"
|
||||||
"Sent Items",
|
|
||||||
"Deleted Items",
|
|
||||||
"Archive",
|
|
||||||
"Junk Email"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,6 @@ profile multihead-HDMI {
|
||||||
}
|
}
|
||||||
|
|
||||||
profile nomad {
|
profile nomad {
|
||||||
output eDP-1 enable mode 1920x1080
|
output eDP-1 enable
|
||||||
exec light -S 70
|
exec light -S 70
|
||||||
}
|
}
|
||||||
|
|
|
@ -992,6 +992,11 @@ map kitty_mod+delete clear_terminal reset active
|
||||||
|
|
||||||
confirm_os_window_close 0
|
confirm_os_window_close 0
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
||||||| b37187f (Use delta as git diff pager)
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> parent of b37187f (Use delta as git diff pager)
|
||||||
|
|
|
@ -116,12 +116,20 @@ Create Both
|
||||||
Expunge Both
|
Expunge Both
|
||||||
SyncState *
|
SyncState *
|
||||||
|
|
||||||
|
Channel ugent-mailing-lists
|
||||||
|
Far :ugent-remote:"Mailing Lists"
|
||||||
|
Near :ugent-local:mailing-lists
|
||||||
|
Create Both
|
||||||
|
Expunge Both
|
||||||
|
SyncState *
|
||||||
|
|
||||||
Group ugent
|
Group ugent
|
||||||
Channel ugent-default
|
Channel ugent-default
|
||||||
Channel ugent-sent
|
Channel ugent-sent
|
||||||
Channel ugent-trash
|
Channel ugent-trash
|
||||||
Channel ugent-archive
|
Channel ugent-archive
|
||||||
Channel ugent-junk
|
Channel ugent-junk
|
||||||
|
Channel ugent-mailing-lists
|
||||||
|
|
||||||
IMAPAccount disroot
|
IMAPAccount disroot
|
||||||
Host disroot.org
|
Host disroot.org
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
# vim: filetype=neomuttrc
|
|
||||||
# muttrc file for account disroot
|
|
||||||
set realname = "Amin Kasrou Aouam"
|
|
||||||
set from = "akasroua@disroot.org"
|
|
||||||
set sendmail = "~/.config/neomutt/etc/sendmail disroot"
|
|
||||||
set folder = "~/.mail/disroot"
|
|
||||||
|
|
||||||
set mbox_type = Maildir
|
|
||||||
set ssl_starttls = yes
|
|
||||||
set ssl_force_tls = yes
|
|
||||||
|
|
||||||
bind index,pager gg noop
|
|
||||||
bind index,pager g noop
|
|
||||||
bind index gg first-entry
|
|
||||||
unmailboxes *
|
|
||||||
mailboxes =junk =inbox =trash =sent =bookings =buying =services =smart =travel
|
|
||||||
macro index,pager gi "<change-folder>=inbox<enter>" "Go to inbox."
|
|
||||||
macro index,pager gs "<change-folder>=sent<enter>" "Go to sent."
|
|
||||||
macro index,pager gt "<change-folder>=trash<enter>" "Go to trash."
|
|
||||||
macro index,pager gj "<change-folder>=junk<enter>" "Go to spam."
|
|
||||||
macro index,pager gb "<change-folder>=bookings<enter>" "Go to bookings."
|
|
||||||
macro index,pager gy "<change-folder>=buying<enter>" "Go to buying."
|
|
||||||
macro index,pager ge "<change-folder>=services<enter>" "Go to services."
|
|
||||||
macro index,pager gm "<change-folder>=smart<enter>" "Go to smart."
|
|
||||||
macro index,pager gr "<change-folder>=travel<enter>" "Go to travel."
|
|
||||||
set spoolfile = "+inbox"
|
|
||||||
set postponed = ""
|
|
||||||
set trash = "+trash"
|
|
|
@ -1,24 +0,0 @@
|
||||||
# vim: filetype=neomuttrc
|
|
||||||
# muttrc file for account gmail
|
|
||||||
set realname = "Amin Kasrou Aouam"
|
|
||||||
set from = "akasroua@gmail.com"
|
|
||||||
set sendmail = "~/.config/neomutt/etc/sendmail gmail"
|
|
||||||
set folder = "~/.mail/gmail"
|
|
||||||
|
|
||||||
set mbox_type = Maildir
|
|
||||||
set ssl_starttls = yes
|
|
||||||
set ssl_force_tls = yes
|
|
||||||
|
|
||||||
bind index,pager gg noop
|
|
||||||
bind index,pager g noop
|
|
||||||
bind index gg first-entry
|
|
||||||
unmailboxes *
|
|
||||||
mailboxes =junk =Inbox =trash =sent
|
|
||||||
macro index,pager gi "<change-folder>=Inbox<enter>" "Go to inbox."
|
|
||||||
macro index,pager gs "<change-folder>=sent<enter>" "Go to sent."
|
|
||||||
macro index,pager gt "<change-folder>=trash<enter>" "Go to trash."
|
|
||||||
macro index,pager gj "<change-folder>=junk<enter>" "Go to spam."
|
|
||||||
set spoolfile = "+Inbox"
|
|
||||||
set record = "+sent"
|
|
||||||
set postponed = ""
|
|
||||||
set trash = "+trash"
|
|
|
@ -1,25 +0,0 @@
|
||||||
# vim: filetype=neomuttrc
|
|
||||||
# muttrc file for account coolneng
|
|
||||||
set realname = "Amin Kasrou Aouam"
|
|
||||||
set from = "amin.kasrouaouam@ugent.be"
|
|
||||||
set sendmail = "~/.config/neomutt/etc/sendmail ugent"
|
|
||||||
set folder = "~/.mail/ugent"
|
|
||||||
|
|
||||||
set mbox_type = Maildir
|
|
||||||
set ssl_starttls = yes
|
|
||||||
set ssl_force_tls = yes
|
|
||||||
|
|
||||||
bind index,pager gg noop
|
|
||||||
bind index,pager g noop
|
|
||||||
bind index gg first-entry
|
|
||||||
unmailboxes *
|
|
||||||
mailboxes =inbox =sent =trash =archive =junk
|
|
||||||
macro index,pager gi "<change-folder>=inbox<enter>" "Go to inbox."
|
|
||||||
macro index,pager gs "<change-folder>=sent<enter>" "Go to sent."
|
|
||||||
macro index,pager gt "<change-folder>=trash<enter>" "Go to trash."
|
|
||||||
macro index,pager ga "<change-folder>=archive<enter>" "Go to archive."
|
|
||||||
macro index,pager gj "<change-folder>=junk<enter>" "Go to junk."
|
|
||||||
set spoolfile = "+inbox"
|
|
||||||
set record = "+sent"
|
|
||||||
set postponed = ""
|
|
||||||
set trash = "+deleted"
|
|
|
@ -1,66 +0,0 @@
|
||||||
# Header colors:
|
|
||||||
color header blue default ".*"
|
|
||||||
color header brightmagenta default "^(From)"
|
|
||||||
color header brightcyan default "^(Subject)"
|
|
||||||
color header brightwhite default "^(CC|BCC)"
|
|
||||||
|
|
||||||
mono bold bold
|
|
||||||
mono underline underline
|
|
||||||
mono indicator reverse
|
|
||||||
mono error bold
|
|
||||||
color normal default default
|
|
||||||
color indicator brightmagenta default # currently selected message. default makes bar clear, disabled arrow to save space.
|
|
||||||
color sidebar_highlight red default
|
|
||||||
color sidebar_divider brightblack black
|
|
||||||
color sidebar_flagged red black
|
|
||||||
color sidebar_new green black
|
|
||||||
color normal brightyellow default
|
|
||||||
color error red default
|
|
||||||
color tilde black default
|
|
||||||
color message cyan default
|
|
||||||
color markers red white
|
|
||||||
color attachment white default
|
|
||||||
color search brightmagenta default
|
|
||||||
color status magenta black
|
|
||||||
color hdrdefault brightgreen default
|
|
||||||
color quoted green default
|
|
||||||
color quoted1 blue default
|
|
||||||
color quoted2 cyan default
|
|
||||||
color quoted3 yellow default
|
|
||||||
color quoted4 red default
|
|
||||||
color quoted5 brightred default
|
|
||||||
color signature brightgreen default
|
|
||||||
color bold black default
|
|
||||||
color underline black default
|
|
||||||
color normal default default
|
|
||||||
|
|
||||||
color body brightblue default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
|
|
||||||
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
|
|
||||||
color body green default "\`[^\`]*\`" # Green text between ` and `
|
|
||||||
color body brightblue default "^# \.*" # Headings as bold blue
|
|
||||||
color body brightcyan default "^## \.*" # Subheadings as bold cyan
|
|
||||||
color body brightgreen default "^### \.*" # Subsubheadings as bold green
|
|
||||||
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
|
|
||||||
color body brightcyan default "[;:][-o][)/(|]" # emoticons
|
|
||||||
color body brightcyan default "[;:][)(|]" # emoticons
|
|
||||||
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
|
|
||||||
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
|
|
||||||
color body red default "(BAD signature)"
|
|
||||||
color body cyan default "(Good signature)"
|
|
||||||
color body brightblack default "^gpg: Good signature .*"
|
|
||||||
color body brightyellow default "^gpg: "
|
|
||||||
color body brightyellow red "^gpg: BAD signature from.*"
|
|
||||||
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
|
|
||||||
|
|
||||||
# Default index colors:
|
|
||||||
color index brightwhite default '.*'
|
|
||||||
color index_author brightgreen default '.*'
|
|
||||||
color index_number blue default
|
|
||||||
color index_subject cyan default '.*'
|
|
||||||
|
|
||||||
# For new mail:
|
|
||||||
color index brightyellow black "~N"
|
|
||||||
color index_author brightred black "~N"
|
|
||||||
color index_subject brightcyan black "~N"
|
|
||||||
|
|
||||||
color progress black cyan
|
|
|
@ -1,21 +0,0 @@
|
||||||
## A file for aliases
|
|
||||||
|
|
||||||
# UGR professors
|
|
||||||
alias dani dmolina@decsai.ugr.es
|
|
||||||
alias cano ccano@decsai.ugr.es
|
|
||||||
alias merino cmerino@ugr.es
|
|
||||||
alias fran fjrodriguez@decsai.ugr.es
|
|
||||||
alias salva salvaguti@decsai.ugr.es
|
|
||||||
alias marisol marisolbc@ugr.es
|
|
||||||
|
|
||||||
# UGent students
|
|
||||||
alias mickey michael.fatjanov@ugent.be
|
|
||||||
alias natan natan.tourne@ugent.be
|
|
||||||
alias conor sean.barr@ugent.be
|
|
||||||
|
|
||||||
# Personal
|
|
||||||
alias barbas arodasaparicio@gmail.com
|
|
||||||
alias rafika rafibel63@gmail.com
|
|
||||||
alias oekk luismata06@gmail.com
|
|
||||||
alias walid mkasrou@gmail.com
|
|
||||||
alias walida naouam61@gmail.com
|
|
|
@ -1,131 +0,0 @@
|
||||||
# -*-muttrc-*-
|
|
||||||
#
|
|
||||||
# Command formats for gpg.
|
|
||||||
#
|
|
||||||
# Version notes:
|
|
||||||
#
|
|
||||||
# GPG 2.1 introduces the option "--pinentry-mode", which requires
|
|
||||||
# the "loopback" argument in instances where "--passphrase-fd" is
|
|
||||||
# used.
|
|
||||||
#
|
|
||||||
# Some of the older commented-out versions of the commands use gpg-2comp from:
|
|
||||||
# http://70t.de/download/gpg-2comp.tar.gz
|
|
||||||
#
|
|
||||||
# %p The empty string when no passphrase is needed,
|
|
||||||
# the string "PGPPASSFD=0" if one is needed.
|
|
||||||
#
|
|
||||||
# This is mostly used in conditional % sequences.
|
|
||||||
#
|
|
||||||
# %f Most PGP commands operate on a single file or a file
|
|
||||||
# containing a message. %f expands to this file's name.
|
|
||||||
#
|
|
||||||
# %s When verifying signatures, there is another temporary file
|
|
||||||
# containing the detached signature. %s expands to this
|
|
||||||
# file's name.
|
|
||||||
#
|
|
||||||
# %a In "signing" contexts, this expands to the value of the
|
|
||||||
# configuration variable $pgp_sign_as, if set, otherwise
|
|
||||||
# $pgp_default_key. You probably need to
|
|
||||||
# use this within a conditional % sequence.
|
|
||||||
#
|
|
||||||
# %r In many contexts, neomutt passes key IDs to pgp. %r expands to
|
|
||||||
# a list of key IDs.
|
|
||||||
|
|
||||||
# Section A: Key Management
|
|
||||||
|
|
||||||
# The default key for encryption (used by $pgp_self_encrypt and
|
|
||||||
# $postpone_encrypt).
|
|
||||||
#
|
|
||||||
# It will also be used for signing unless $pgp_sign_as is set to a
|
|
||||||
# key.
|
|
||||||
#
|
|
||||||
# Unless your key does not have encryption capability, uncomment this
|
|
||||||
# line and replace the keyid with your own.
|
|
||||||
#
|
|
||||||
# set pgp_default_key="0x12345678"
|
|
||||||
|
|
||||||
# If you have a separate signing key, or your key _only_ has signing
|
|
||||||
# capability, uncomment this line and replace the keyid with your
|
|
||||||
# signing keyid.
|
|
||||||
#
|
|
||||||
# set pgp_sign_as="0x87654321"
|
|
||||||
|
|
||||||
|
|
||||||
# Section B: Commands
|
|
||||||
|
|
||||||
# Note that we explicitly set the comment armor header since GnuPG, when used
|
|
||||||
# in some localiaztion environments, generates 8bit data in that header, thereby
|
|
||||||
# breaking PGP/MIME.
|
|
||||||
|
|
||||||
# decode application/pgp
|
|
||||||
#
|
|
||||||
set pgp_decode_command="gpg --status-fd=2 %?p?--pinentry-mode loopback --passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
|
|
||||||
|
|
||||||
# Verify a signature
|
|
||||||
#
|
|
||||||
set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
|
|
||||||
|
|
||||||
# Decrypt an attachment
|
|
||||||
#
|
|
||||||
set pgp_decrypt_command="gpg --status-fd=2 %?p?--pinentry-mode loopback --passphrase-fd 0? --no-verbose --quiet --batch --output - --decrypt %f"
|
|
||||||
|
|
||||||
# Create a PGP/MIME signed attachment
|
|
||||||
#
|
|
||||||
# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
|
|
||||||
#
|
|
||||||
set pgp_sign_command="gpg %?p?--pinentry-mode loopback --passphrase-fd 0? --no-verbose --batch --quiet --output - --armor --textmode %?a?--local-user %a? --detach-sign %f"
|
|
||||||
|
|
||||||
# Create a application/pgp inline signed message. This style is obsolete but still needed for Hushmail recipients and some MUAs.
|
|
||||||
#
|
|
||||||
# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
|
|
||||||
#
|
|
||||||
set pgp_clearsign_command="gpg %?p?--pinentry-mode loopback --passphrase-fd 0? --no-verbose --batch --quiet --output - --armor --textmode %?a?--local-user %a? --clearsign %f"
|
|
||||||
|
|
||||||
# Create an encrypted attachment (note that some users include the --always-trust option here)
|
|
||||||
#
|
|
||||||
# set pgp_encrypt_only_command="/usr/libexec/neomutt/pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
|
|
||||||
#
|
|
||||||
set pgp_encrypt_only_command="/usr/libexec/neomutt/pgpewrap gpg --batch --quiet --no-verbose --output - --textmode --armor --encrypt -- --recipient %r -- %f"
|
|
||||||
|
|
||||||
# Create an encrypted and signed attachment (note that some users include the --always-trust option here)
|
|
||||||
#
|
|
||||||
# set pgp_encrypt_sign_command="/usr/libexec/neomutt/pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
|
|
||||||
#
|
|
||||||
set pgp_encrypt_sign_command="/usr/libexec/neomutt/pgpewrap gpg %?p?--pinentry-mode loopback --passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - %?a?--local-user %a? --armor --sign --encrypt -- --recipient %r -- %f"
|
|
||||||
|
|
||||||
# Import a key into the public key ring
|
|
||||||
#
|
|
||||||
set pgp_import_command="gpg --no-verbose --import %f"
|
|
||||||
|
|
||||||
# Export a key from the public key ring
|
|
||||||
#
|
|
||||||
set pgp_export_command="gpg --no-verbose --armor --export %r"
|
|
||||||
|
|
||||||
# Verify a key
|
|
||||||
#
|
|
||||||
set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r"
|
|
||||||
|
|
||||||
# Read in the public key ring
|
|
||||||
#
|
|
||||||
set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-keys %r"
|
|
||||||
|
|
||||||
# Read in the secret key ring
|
|
||||||
#
|
|
||||||
set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-secret-keys %r"
|
|
||||||
|
|
||||||
# Fetch keys
|
|
||||||
# set pgp_getkeys_command="pkspxycwrap %r"
|
|
||||||
|
|
||||||
# pattern for good signature - may need to be adapted to locale!
|
|
||||||
# OK, here's a version which uses gnupg's message catalog:
|
|
||||||
# set pgp_good_sign="^gpgv?: Good signature from"
|
|
||||||
# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
|
|
||||||
#
|
|
||||||
# Output pattern to indicate a valid signature using --status-fd messages
|
|
||||||
set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
|
|
||||||
|
|
||||||
# Output pattern to verify a decryption occurred
|
|
||||||
# This is now deprecated by pgp_check_gpg_decrypt_status_fd:
|
|
||||||
# set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY"
|
|
||||||
set pgp_check_gpg_decrypt_status_fd
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
text/html; w3m -I %{charset} -T text/html %s; copiousoutput;
|
|
||||||
text/* ; nvim %s ; edit=nvim %s ; compose=nvim %s ; needsterminal
|
|
||||||
image/*; imv %s ; copiousoutput
|
|
||||||
application/pdf; zathura %s ;
|
|
||||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice %s ;
|
|
||||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice %s ;
|
|
||||||
application/msword; libreoffice %s ;
|
|
||||||
application/pgp-encrypted; gpg -d '%s'; copiousoutput;
|
|
|
@ -1,71 +0,0 @@
|
||||||
# vim: filetype=neomuttrc
|
|
||||||
|
|
||||||
# Default index colors:
|
|
||||||
color index yellow default '.*'
|
|
||||||
color index_author red default '.*'
|
|
||||||
color index_number blue default
|
|
||||||
color index_subject cyan default '.*'
|
|
||||||
|
|
||||||
# For new mail:
|
|
||||||
color index brightyellow black "~N"
|
|
||||||
color index_author brightred black "~N"
|
|
||||||
color index_subject brightcyan black "~N"
|
|
||||||
|
|
||||||
# Header colors:
|
|
||||||
color header blue default ".*"
|
|
||||||
color header brightmagenta default "^(From)"
|
|
||||||
color header brightcyan default "^(Subject)"
|
|
||||||
color header brightwhite default "^(CC|BCC)"
|
|
||||||
|
|
||||||
mono bold bold
|
|
||||||
mono underline underline
|
|
||||||
mono indicator reverse
|
|
||||||
mono error bold
|
|
||||||
color normal default default
|
|
||||||
color indicator brightblack white
|
|
||||||
color sidebar_highlight red default
|
|
||||||
color sidebar_divider brightblack black
|
|
||||||
color sidebar_flagged red black
|
|
||||||
color sidebar_new green black
|
|
||||||
color normal brightyellow default
|
|
||||||
color error red default
|
|
||||||
color tilde black default
|
|
||||||
color message cyan default
|
|
||||||
color markers red white
|
|
||||||
color attachment white default
|
|
||||||
color search brightmagenta default
|
|
||||||
color status brightyellow black
|
|
||||||
color hdrdefault brightgreen default
|
|
||||||
color quoted green default
|
|
||||||
color quoted1 blue default
|
|
||||||
color quoted2 cyan default
|
|
||||||
color quoted3 yellow default
|
|
||||||
color quoted4 red default
|
|
||||||
color quoted5 brightred default
|
|
||||||
color signature brightgreen default
|
|
||||||
color bold black default
|
|
||||||
color underline black default
|
|
||||||
color normal default default
|
|
||||||
|
|
||||||
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
|
|
||||||
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
|
|
||||||
color body green default "\`[^\`]*\`" # Green text between ` and `
|
|
||||||
color body brightblue default "^# \.*" # Headings as bold blue
|
|
||||||
color body brightcyan default "^## \.*" # Subheadings as bold cyan
|
|
||||||
color body brightgreen default "^### \.*" # Subsubheadings as bold green
|
|
||||||
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
|
|
||||||
color body brightcyan default "[;:][-o][)/(|]" # emoticons
|
|
||||||
color body brightcyan default "[;:][)(|]" # emoticons
|
|
||||||
color body brightcyan default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\
|
|
||||||
|FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\
|
|
||||||
|IRL|RTFM|ROTFL|ROFL|YMMV)[*]?"
|
|
||||||
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
|
|
||||||
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
|
|
||||||
color body red default "(BAD signature)"
|
|
||||||
color body cyan default "(Good signature)"
|
|
||||||
color body brightblack default "^gpg: Good signature .*"
|
|
||||||
color body brightyellow default "^gpg: "
|
|
||||||
color body brightyellow red "^gpg: BAD signature from.*"
|
|
||||||
mono body bold "^gpg: Good signature"
|
|
||||||
mono body bold "^gpg: BAD signature from.*"
|
|
||||||
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]""']))']))']))']))']))']))']))']))']))']))']))']))'])']))))))])]"
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
nix-shell -p python3 --command "python ~/.local/bin/MIMEmbellish | msmtp -a $1 -t"
|
|
|
@ -1,93 +0,0 @@
|
||||||
#vim: filetype=neomuttrc
|
|
||||||
# This is the general mutt config which has the settings that all accounts use.
|
|
||||||
bind index,pager i noop
|
|
||||||
bind index,pager g noop
|
|
||||||
bind index \Cf noop
|
|
||||||
source etc/muttcol
|
|
||||||
source etc/aliases
|
|
||||||
source personal.muttrc
|
|
||||||
source colors.muttrc
|
|
||||||
set sleep_time = 0
|
|
||||||
set sort = 'reverse-date'
|
|
||||||
set editor = $EDITOR
|
|
||||||
set copy = no
|
|
||||||
set beep_new = yes
|
|
||||||
set mailcap_path = ~/.config/neomutt/etc/mailcap
|
|
||||||
set date_format="%d/%m/%y %H:%M"
|
|
||||||
set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)"
|
|
||||||
set markers = no
|
|
||||||
set mark_old = no
|
|
||||||
set mime_forward = yes
|
|
||||||
set smtp_authenticators = 'gssapi:login'
|
|
||||||
set wait_key = no
|
|
||||||
auto_view text/html
|
|
||||||
auto_view application/pgp-encrypted
|
|
||||||
alternative_order text/plain text/enriched text/html
|
|
||||||
set rfc2047_parameters = yes
|
|
||||||
set send_charset = 'us-ascii:utf-8'
|
|
||||||
set ssl_use_tlsv1_2 = yes
|
|
||||||
unset help
|
|
||||||
set pager_stop = yes
|
|
||||||
set wrap=-20
|
|
||||||
|
|
||||||
# General remappings
|
|
||||||
bind editor <space> noop
|
|
||||||
bind index G last-entry
|
|
||||||
bind index gg first-entry
|
|
||||||
bind pager j next-line
|
|
||||||
bind pager k previous-line
|
|
||||||
bind pager gg top
|
|
||||||
bind pager G bottom
|
|
||||||
bind index d half-down
|
|
||||||
bind index u half-up
|
|
||||||
bind index D delete-message
|
|
||||||
bind index U undelete-message
|
|
||||||
bind index F search
|
|
||||||
bind index,pager R group-reply
|
|
||||||
bind index,pager \031 previous-undeleted # Mouse wheel
|
|
||||||
bind index,pager \005 next-undeleted # Mouse wheel
|
|
||||||
macro index,pager S <sync-mailbox>
|
|
||||||
macro index,pager \Cu |urlscan\n
|
|
||||||
macro index,pager ,, |urlscan\n
|
|
||||||
|
|
||||||
# View attachments properly.
|
|
||||||
bind attach <return> view-mailcap
|
|
||||||
set fast_reply # skip to compose when replying
|
|
||||||
set fcc_attach # save attachments with the body
|
|
||||||
unset mime_forward # forward attachments as part of body
|
|
||||||
set forward_format = "Fwd: %s" # format of subject when forwarding
|
|
||||||
set forward_decode # decode when forwarding
|
|
||||||
set forward_quote # include message in forwards
|
|
||||||
set reverse_name # reply as whomever it was to
|
|
||||||
set include # include message in replies
|
|
||||||
|
|
||||||
#Ctrl-R to mark all as read
|
|
||||||
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
|
|
||||||
#
|
|
||||||
# #sync email
|
|
||||||
macro index o "<shell-escape>mbsync -a 2>/dev/null 1>&2 &<enter>" "run mbsync to sync all mail"
|
|
||||||
|
|
||||||
# #copy/move dialogs
|
|
||||||
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
|
|
||||||
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
|
|
||||||
|
|
||||||
# Notmuch searching
|
|
||||||
macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern"
|
|
||||||
macro index A "<limit>all\n" "show all messages (undo limit)"
|
|
||||||
|
|
||||||
# # Sidebar mappings
|
|
||||||
set sidebar_visible = yes
|
|
||||||
set sidebar_width = 20
|
|
||||||
set sidebar_short_path = yes
|
|
||||||
set sidebar_next_new_wrap = yes
|
|
||||||
set mail_check_stats
|
|
||||||
set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?'
|
|
||||||
bind index,pager \Ck sidebar-prev
|
|
||||||
bind index,pager \Cj sidebar-next
|
|
||||||
bind index,pager \Co sidebar-open
|
|
||||||
bind index,pager \Cp sidebar-prev-new
|
|
||||||
bind index,pager \Cn sidebar-next-new
|
|
||||||
bind index,pager B sidebar-toggle-visible
|
|
||||||
|
|
||||||
# Remove signature
|
|
||||||
unset signature
|
|
|
@ -1,6 +0,0 @@
|
||||||
macro index,pager i3 '<sync-mailbox><enter-command>source "/home/coolneng/.config/neomutt"/accounts/disroot.muttrc<enter><change-folder>!<enter>'
|
|
||||||
source /home/coolneng/.config/neomutt/accounts/disroot.muttrc
|
|
||||||
macro index,pager i2 '<sync-mailbox><enter-command>source "/home/coolneng/.config/neomutt"/accounts/gmail.muttrc<enter><change-folder>!<enter>'
|
|
||||||
source /home/coolneng/.config/neomutt/accounts/gmail.muttrc
|
|
||||||
macro index,pager i1 '<sync-mailbox><enter-command>source "/home/coolneng/.config/neomutt"/accounts/ugent.muttrc<enter><change-folder>!<enter>'
|
|
||||||
source /home/coolneng/.config/neomutt/accounts/ugent.muttrc
|
|
|
@ -1,238 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
import email
|
|
||||||
import shlex
|
|
||||||
import mimetypes
|
|
||||||
import subprocess
|
|
||||||
from copy import copy
|
|
||||||
from hashlib import md5
|
|
||||||
from email import charset
|
|
||||||
from email import encoders
|
|
||||||
from email.mime.text import MIMEText
|
|
||||||
from email.mime.multipart import MIMEMultipart
|
|
||||||
from email.mime.nonmultipart import MIMENonMultipart
|
|
||||||
from os.path import basename, splitext, expanduser
|
|
||||||
|
|
||||||
|
|
||||||
charset.add_charset('utf-8', charset.SHORTEST, '8bit')
|
|
||||||
|
|
||||||
|
|
||||||
def pandoc(from_format, to_format='markdown', plain='markdown', title=None):
|
|
||||||
markdown = ('markdown'
|
|
||||||
'-blank_before_blockquote')
|
|
||||||
|
|
||||||
if from_format == 'plain':
|
|
||||||
from_format = plain
|
|
||||||
if from_format == 'markdown':
|
|
||||||
from_format = markdown
|
|
||||||
if to_format == 'markdown':
|
|
||||||
to_format = markdown
|
|
||||||
|
|
||||||
command = 'pandoc -f {} -t {} --standalone --highlight-style=tango'
|
|
||||||
if to_format in ('html', 'html5'):
|
|
||||||
if title is not None:
|
|
||||||
command += ' --variable=pagetitle:{}'.format(shlex.quote(title))
|
|
||||||
command += ' --webtex --template={}'.format(
|
|
||||||
expanduser('~/.pandoc/templates/email.html'))
|
|
||||||
return command.format(from_format, to_format)
|
|
||||||
|
|
||||||
|
|
||||||
def gmailfy(payload):
|
|
||||||
return payload.replace('<blockquote>',
|
|
||||||
'<blockquote class="gmail_quote" style="'
|
|
||||||
'padding: 0 7px 0 7px;'
|
|
||||||
'border-left: 2px solid #cccccc;'
|
|
||||||
'font-style: italic;'
|
|
||||||
'margin: 0 0 7px 3px;'
|
|
||||||
'">')
|
|
||||||
|
|
||||||
|
|
||||||
def make_alternative(message, part):
|
|
||||||
alternative = convert(part, 'html',
|
|
||||||
pandoc(part.get_content_subtype(),
|
|
||||||
to_format='html',
|
|
||||||
title=message.get('Subject')))
|
|
||||||
alternative.set_payload(gmailfy(alternative.get_payload()))
|
|
||||||
return alternative
|
|
||||||
|
|
||||||
|
|
||||||
def make_replacement(message, part):
|
|
||||||
return convert(part, 'plain', pandoc(part.get_content_subtype()))
|
|
||||||
|
|
||||||
|
|
||||||
def convert(part, to_subtype, command):
|
|
||||||
payload = part.get_payload()
|
|
||||||
if isinstance(payload, str):
|
|
||||||
payload = payload.encode('utf-8')
|
|
||||||
else:
|
|
||||||
payload = part.get_payload(None, True)
|
|
||||||
if not isinstance(payload, bytes):
|
|
||||||
payload = payload.encode('utf-8')
|
|
||||||
process = subprocess.run(
|
|
||||||
shlex.split(command),
|
|
||||||
input=payload, stdout=subprocess.PIPE, check=True)
|
|
||||||
return MIMEText(process.stdout, to_subtype, 'utf-8')
|
|
||||||
|
|
||||||
|
|
||||||
def with_alternative(parent, part, from_signed,
|
|
||||||
make_alternative=make_alternative,
|
|
||||||
make_replacement=None):
|
|
||||||
try:
|
|
||||||
alternative = make_alternative(parent or part, from_signed or part)
|
|
||||||
replacement = (make_replacement(parent or part, part)
|
|
||||||
if from_signed is None and make_replacement is not None
|
|
||||||
else part)
|
|
||||||
except:
|
|
||||||
return parent or part
|
|
||||||
envelope = MIMEMultipart('alternative')
|
|
||||||
if parent is None:
|
|
||||||
for k, v in part.items():
|
|
||||||
if (k.lower() != 'mime-version'
|
|
||||||
and not k.lower().startswith('content-')):
|
|
||||||
envelope.add_header(k, v)
|
|
||||||
del part[k]
|
|
||||||
envelope.attach(replacement)
|
|
||||||
envelope.attach(alternative)
|
|
||||||
if parent is None:
|
|
||||||
return envelope
|
|
||||||
payload = parent.get_payload()
|
|
||||||
payload[payload.index(part)] = envelope
|
|
||||||
return parent
|
|
||||||
|
|
||||||
|
|
||||||
def tag_attachments(message):
|
|
||||||
if message.get_content_type() == 'multipart/mixed':
|
|
||||||
for part in message.get_payload():
|
|
||||||
if (part.get_content_maintype() in ['image']
|
|
||||||
and 'Content-ID' not in part):
|
|
||||||
filename = part.get_param('filename',
|
|
||||||
header='Content-Disposition')
|
|
||||||
if isinstance(filename, tuple):
|
|
||||||
filename = str(filename[2], filename[0] or 'us-ascii')
|
|
||||||
if filename:
|
|
||||||
filename = splitext(basename(filename))[0]
|
|
||||||
if filename:
|
|
||||||
part.add_header('Content-ID', '<{}>'.format(filename))
|
|
||||||
return message
|
|
||||||
|
|
||||||
|
|
||||||
def attachment_from_file_path(attachment_path):
|
|
||||||
try:
|
|
||||||
mime, encoding = mimetypes.guess_type(attachment_path, strict=False)
|
|
||||||
maintype, subtype = mime.split('/')
|
|
||||||
with open(attachment_path, 'rb') as payload:
|
|
||||||
attachment = MIMENonMultipart(maintype, subtype)
|
|
||||||
attachment.set_payload(payload.read())
|
|
||||||
encoders.encode_base64(attachment)
|
|
||||||
if encoding:
|
|
||||||
attachment.add_header('Content-Encoding', encoding)
|
|
||||||
return attachment
|
|
||||||
except:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attachment_path_pattern = re.compile(r'\]\s*\(\s*file://(/[^)]*\S)\s*\)|'
|
|
||||||
r'\]\s*:\s*file://(/.*\S)\s*$',
|
|
||||||
re.MULTILINE)
|
|
||||||
|
|
||||||
|
|
||||||
def link_attachments(payload):
|
|
||||||
attached = []
|
|
||||||
attachments = []
|
|
||||||
|
|
||||||
def on_match(match):
|
|
||||||
if match.group(1):
|
|
||||||
attachment_path = match.group(1)
|
|
||||||
cid_fmt = '](cid:{})'
|
|
||||||
else:
|
|
||||||
attachment_path = match.group(2)
|
|
||||||
cid_fmt = ']: cid:{}'
|
|
||||||
attachment_id = md5(attachment_path.encode()).hexdigest()
|
|
||||||
if attachment_id in attached:
|
|
||||||
return cid_fmt.format(attachment_id)
|
|
||||||
attachment = attachment_from_file_path(attachment_path)
|
|
||||||
if attachment:
|
|
||||||
attachment.add_header('Content-ID', '<{}>'.format(attachment_id))
|
|
||||||
attachments.append(attachment)
|
|
||||||
attached.append(attachment_id)
|
|
||||||
return cid_fmt.format(attachment_id)
|
|
||||||
return match.group()
|
|
||||||
|
|
||||||
return attachments, attachment_path_pattern.sub(on_match, payload)
|
|
||||||
|
|
||||||
|
|
||||||
def with_local_attachments(parent, part, from_signed,
|
|
||||||
link_attachments=link_attachments):
|
|
||||||
if from_signed is None:
|
|
||||||
attachments, payload = link_attachments(part.get_payload())
|
|
||||||
part.set_payload(payload)
|
|
||||||
else:
|
|
||||||
attachments, payload = link_attachments(from_signed.get_payload())
|
|
||||||
from_signed = copy(from_signed)
|
|
||||||
from_signed.set_payload(payload)
|
|
||||||
if not attachments:
|
|
||||||
return parent, part, from_signed
|
|
||||||
if parent is None:
|
|
||||||
parent = MIMEMultipart('mixed')
|
|
||||||
for k, v in part.items():
|
|
||||||
if (k.lower() != 'mime-version'
|
|
||||||
and not k.lower().startswith('content-')):
|
|
||||||
parent.add_header(k, v)
|
|
||||||
del part[k]
|
|
||||||
parent.attach(part)
|
|
||||||
for attachment in attachments:
|
|
||||||
parent.attach(attachment)
|
|
||||||
return parent, part, from_signed
|
|
||||||
|
|
||||||
|
|
||||||
def is_target(part, target_subtypes):
|
|
||||||
return (part.get('Content-Disposition', 'inline') == 'inline'
|
|
||||||
and part.get_content_maintype() == 'text'
|
|
||||||
and part.get_content_subtype() in target_subtypes)
|
|
||||||
|
|
||||||
|
|
||||||
def pick_from_signed(part, target_subtypes):
|
|
||||||
for from_signed in part.get_payload():
|
|
||||||
if is_target(from_signed, target_subtypes):
|
|
||||||
return from_signed
|
|
||||||
|
|
||||||
|
|
||||||
def seek_target(message, target_subtypes=['plain', 'markdown']):
|
|
||||||
if message.is_multipart():
|
|
||||||
if message.get_content_type() == 'multipart/signed':
|
|
||||||
part = pick_from_signed(message, target_subtypes)
|
|
||||||
if part is not None:
|
|
||||||
return None, message, part
|
|
||||||
elif message.get_content_type() == 'multipart/mixed':
|
|
||||||
for part in message.get_payload():
|
|
||||||
if part.is_multipart():
|
|
||||||
if part.get_content_type() == 'multipart/signed':
|
|
||||||
from_signed = pick_from_signed(part, target_subtypes)
|
|
||||||
if from_signed is not None:
|
|
||||||
return message, part, from_signed
|
|
||||||
elif is_target(part, target_subtypes):
|
|
||||||
return message, part, None
|
|
||||||
else:
|
|
||||||
if is_target(message, target_subtypes):
|
|
||||||
return None, message, None
|
|
||||||
return None, None, None
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
try:
|
|
||||||
message = email.message_from_file(sys.stdin)
|
|
||||||
parent, part, from_signed = seek_target(message)
|
|
||||||
if (parent, part, from_signed) == (None, None, None):
|
|
||||||
print(message)
|
|
||||||
return
|
|
||||||
tag_attachments(message)
|
|
||||||
print(with_alternative(
|
|
||||||
*with_local_attachments(parent, part, from_signed)))
|
|
||||||
except (BrokenPipeError, KeyboardInterrupt):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,101 +0,0 @@
|
||||||
snippet sign "Signature"
|
|
||||||
Best regards,
|
|
||||||
|
|
||||||
Amin Kasrou Aouam
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet firma "Spanish Signature"
|
|
||||||
Un saludo,
|
|
||||||
|
|
||||||
Amin Kasrou Aouam
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet meta "YAML metadata for eisvogel"
|
|
||||||
---
|
|
||||||
title: "$1"
|
|
||||||
author: [Amin Kasrou Aouam]
|
|
||||||
date: "`date +%F`"
|
|
||||||
titlepage: true
|
|
||||||
logo: /home/coolneng/Pictures/Logos/UGR.png
|
|
||||||
listings-no-page-break: true
|
|
||||||
toc-own-page: true
|
|
||||||
...
|
|
||||||
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet hand "YAML metadata for tufte-handout"
|
|
||||||
---
|
|
||||||
documentclass: tufte-handout
|
|
||||||
title: $1
|
|
||||||
author: Amin Kasrou Aouam
|
|
||||||
date: `date +%F`
|
|
||||||
fontsize: 12pt
|
|
||||||
...
|
|
||||||
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet ass "YAML metadata for assignment"
|
|
||||||
---
|
|
||||||
title: $1
|
|
||||||
author: Amin Kasrou Aouam
|
|
||||||
date: `date +%F`
|
|
||||||
---
|
|
||||||
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet slides "YAML metadata for the Metropolis template"
|
|
||||||
---
|
|
||||||
title: "$1"
|
|
||||||
author: [Amin Kasrou Aouam]
|
|
||||||
date: "`date +%F`"
|
|
||||||
header-includes:
|
|
||||||
|
|
||||||
- \definecolor{dkgreen}{rgb}{0,0.52,0}
|
|
||||||
- \definecolor{gray}{rgb}{0.5,0.5,0.5}
|
|
||||||
- \definecolor{mauve}{rgb}{0.4,0,0.7}
|
|
||||||
- \definecolor{customBlue}{rgb}{0.1,0.1,0.65}
|
|
||||||
- \definecolor{customOrange}{rgb}{0.88,0.53,0.13}
|
|
||||||
- \lstset{frame=tb}
|
|
||||||
- \lstset{language=c}
|
|
||||||
- \lstset{aboveskip=5mm}
|
|
||||||
- \lstset{belowskip=5mm}
|
|
||||||
- \lstset{showstringspaces=false}
|
|
||||||
- \lstset{columns=flexible}
|
|
||||||
- \lstset{basicstyle={\scriptsize\ttfamily}}
|
|
||||||
- \lstset{numbers=left}
|
|
||||||
- \lstset{numberstyle=\tiny}
|
|
||||||
- \lstset{stepnumber=1}
|
|
||||||
- \lstset{numbersep=8pt}
|
|
||||||
- \lstset{numberstyle=\tiny\color{gray}}
|
|
||||||
- \lstset{keywordstyle=\color{customBlue}}
|
|
||||||
- \lstset{commentstyle=\color{dkgreen}}
|
|
||||||
- \lstset{stringstyle=\color{mauve}}
|
|
||||||
- \lstset{breaklines=true}
|
|
||||||
- \lstset{breakatwhitespace=true}
|
|
||||||
- \lstset{tabsize=4}
|
|
||||||
...
|
|
||||||
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet b "Bullet point"
|
|
||||||
|
|
||||||
* $1
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet sl "Slide notes"
|
|
||||||
|
|
||||||
# Slide $1
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet fsl "First slide notes"
|
|
||||||
# Slide $1
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet se "Section notes"
|
|
||||||
|
|
||||||
# Section $1
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet fse "First section notes"
|
|
||||||
# Section $1
|
|
||||||
endsnippet
|
|
|
@ -25,19 +25,12 @@ nnoremap <leader>n :noh<cr>
|
||||||
"Move the current line up or down
|
"Move the current line up or down
|
||||||
nnoremap <leader>k :m-2<cr>==
|
nnoremap <leader>k :m-2<cr>==
|
||||||
nnoremap <leader>j :m+<cr>==
|
nnoremap <leader>j :m+<cr>==
|
||||||
""Markdown
|
|
||||||
autocmd Filetype markdown Goyo
|
|
||||||
let g:markdown_fenced_languages = ['cpp', 'python', 'java', 'sql']
|
|
||||||
let g:vim_markdown_math=1
|
|
||||||
""Snippets
|
""Snippets
|
||||||
let g:UltiSnipsExpandTrigger = '<tab>'
|
let g:UltiSnipsExpandTrigger = '<tab>'
|
||||||
let g:UltiSnipsJumpForwardTrigger = '<tab>'
|
let g:UltiSnipsJumpForwardTrigger = '<tab>'
|
||||||
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
|
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
|
||||||
""Vim-plug
|
""Vim-plug
|
||||||
call plug#begin('~/.config/nvim/plugged')
|
call plug#begin('~/.config/nvim/plugged')
|
||||||
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
|
|
||||||
Plug 'junegunn/goyo.vim', {'for': 'markdown', 'on': 'Goyo' }
|
|
||||||
Plug 'SirVer/ultisnips', { 'for': 'markdown' }
|
|
||||||
Plug 'Raimondi/delimitMate'
|
Plug 'Raimondi/delimitMate'
|
||||||
Plug 'cocopon/iceberg.vim'
|
Plug 'cocopon/iceberg.vim'
|
||||||
Plug 'LnL7/vim-nix'
|
Plug 'LnL7/vim-nix'
|
||||||
|
@ -47,24 +40,3 @@ colorscheme iceberg
|
||||||
set termguicolors
|
set termguicolors
|
||||||
""Disabe status line
|
""Disabe status line
|
||||||
set laststatus=0
|
set laststatus=0
|
||||||
""Set Markdown filetype for neomutt
|
|
||||||
autocmd BufNewFile,BufRead /tmp/neomutt* set filetype=markdown
|
|
||||||
""Quit whether Goyo is active or not
|
|
||||||
function! s:goyo_enter()
|
|
||||||
let b:quitting = 0
|
|
||||||
let b:quitting_bang = 0
|
|
||||||
call feedkeys('jk')
|
|
||||||
autocmd QuitPre <buffer> let b:quitting = 1
|
|
||||||
cabbrev <buffer> q! let b:quitting_bang = 1 <bar> q!
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:goyo_leave()
|
|
||||||
if b:quitting_bang
|
|
||||||
qa!
|
|
||||||
else
|
|
||||||
qa
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
autocmd! User GoyoEnter nested call <SID>goyo_enter()
|
|
||||||
autocmd! User GoyoLeave nested call <SID>goyo_leave()
|
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
# .notmuch-config - Configuration file for the notmuch mail system
|
|
||||||
#
|
|
||||||
# For more information about notmuch, see https://notmuchmail.org
|
|
||||||
|
|
||||||
# Database configuration
|
|
||||||
#
|
|
||||||
# The only value supported here is 'path' which should be the top-level
|
|
||||||
# directory where your mail currently exists and to where mail will be
|
|
||||||
# delivered in the future. Files should be individual email messages.
|
|
||||||
# Notmuch will store its database within a sub-directory of the path
|
|
||||||
# configured here named ".notmuch".
|
|
||||||
#
|
|
||||||
[database]
|
|
||||||
path=/home/coolneng/.mail
|
|
||||||
|
|
||||||
# User configuration
|
|
||||||
#
|
|
||||||
# Here is where you can let notmuch know how you would like to be
|
|
||||||
# addressed. Valid settings are
|
|
||||||
#
|
|
||||||
# name Your full name.
|
|
||||||
# primary_email Your primary email address.
|
|
||||||
# other_email A list (separated by ';') of other email addresses
|
|
||||||
# at which you receive email.
|
|
||||||
#
|
|
||||||
# Notmuch will use the various email addresses configured here when
|
|
||||||
# formatting replies. It will avoid including your own addresses in the
|
|
||||||
# recipient list of replies, and will set the From address based on the
|
|
||||||
# address to which the original email was addressed.
|
|
||||||
#
|
|
||||||
[user]
|
|
||||||
name=Amin Kasrou Aouam
|
|
||||||
primary_email=akasroua@gmail.com
|
|
||||||
other_email=akasroua@correo.ugr.es;
|
|
||||||
|
|
||||||
# Configuration for "notmuch new"
|
|
||||||
#
|
|
||||||
# The following options are supported here:
|
|
||||||
#
|
|
||||||
# tags A list (separated by ';') of the tags that will be
|
|
||||||
# added to all messages incorporated by "notmuch new".
|
|
||||||
#
|
|
||||||
# ignore A list (separated by ';') of file and directory names
|
|
||||||
# that will not be searched for messages by "notmuch new".
|
|
||||||
#
|
|
||||||
# NOTE: *Every* file/directory that goes by one of those
|
|
||||||
# names will be ignored, independent of its depth/location
|
|
||||||
# in the mail store.
|
|
||||||
#
|
|
||||||
[new]
|
|
||||||
tags=unread;inbox;
|
|
||||||
ignore=
|
|
||||||
|
|
||||||
# Search configuration
|
|
||||||
#
|
|
||||||
# The following option is supported here:
|
|
||||||
#
|
|
||||||
# exclude_tags
|
|
||||||
# A ;-separated list of tags that will be excluded from
|
|
||||||
# search results by default. Using an excluded tag in a
|
|
||||||
# query will override that exclusion.
|
|
||||||
#
|
|
||||||
[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
|
|
|
@ -6,4 +6,8 @@ if [ $# -lt 1 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mbsync "$1"
|
mbsync "$1"
|
||||||
notmuch new
|
if pgrep -f 'mu server'; then
|
||||||
|
emacsclient -e '(mu4e-update-index)'
|
||||||
|
else
|
||||||
|
mu index --lazy-check
|
||||||
|
fi
|
||||||
|
|
|
@ -5,20 +5,11 @@ capitalize() {
|
||||||
printf '%s' "$1" | tail -c '+2'
|
printf '%s' "$1" | tail -c '+2'
|
||||||
}
|
}
|
||||||
|
|
||||||
modify_delta() {
|
|
||||||
if [ "$1" = "light" ]; then
|
|
||||||
sed -e "s/light = false/light = true/" -e "s/OneHalfDark/OneHalfLight/" -i ~/.config/git/config
|
|
||||||
else
|
|
||||||
sed -e "s/light = true/light = false/" -e "s/OneHalfLight/OneHalfDark/" -i ~/.config/git/config
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
change_theme() {
|
change_theme() {
|
||||||
sed -i "s/iceberg_$1/iceberg_$2/" ~/.config/kitty/kitty.conf
|
sed -i "s/iceberg_$1/iceberg_$2/" ~/.config/kitty/kitty.conf
|
||||||
sed -i "s/bg=$1/bg=$2/" ~/.config/nvim/init.vim
|
sed -i "s/bg=$1/bg=$2/" ~/.config/nvim/init.vim
|
||||||
sed -i "s/iceberg_$1/iceberg_$2/" ~/.dotfiles/tmux/.tmux.conf
|
sed -i "s/iceberg_$1/iceberg_$2/" ~/.dotfiles/tmux/.tmux.conf
|
||||||
sed -i "s/iceberg_$1/iceberg_$2/" ~/.config/zathura/zathurarc
|
sed -i "s/iceberg_$1/iceberg_$2/" ~/.config/zathura/zathurarc
|
||||||
modify_delta "$2"
|
|
||||||
kitty +kitten themes --reload-in=all "Iceberg $(capitalize "$2")"
|
kitty +kitten themes --reload-in=all "Iceberg $(capitalize "$2")"
|
||||||
tmux source-file ~/.tmux.conf
|
tmux source-file ~/.tmux.conf
|
||||||
nvr --remote-send ":source ~/.config/nvim/init.vim <CR> :set nonumber <CR> :set norelativenumber <CR>"
|
nvr --remote-send ":source ~/.config/nvim/init.vim <CR> :set nonumber <CR> :set norelativenumber <CR>"
|
||||||
|
|
|
@ -5,6 +5,7 @@ select_action() {
|
||||||
"local"
|
"local"
|
||||||
"zion"
|
"zion"
|
||||||
"hpc"
|
"hpc"
|
||||||
|
"kermit-gpu"
|
||||||
)
|
)
|
||||||
action=$(printf '%s\n' "${action_content[@]}" | rofi -no-auto-select -i "$@" -dmenu -p "Choose a session")
|
action=$(printf '%s\n' "${action_content[@]}" | rofi -no-auto-select -i "$@" -dmenu -p "Choose a session")
|
||||||
execute_action "$action"
|
execute_action "$action"
|
||||||
|
@ -19,6 +20,7 @@ execute_action() {
|
||||||
"local") launch_session "local" ;;
|
"local") launch_session "local" ;;
|
||||||
"zion") launch_session "zion" ;;
|
"zion") launch_session "zion" ;;
|
||||||
"hpc") launch_session "hpc" ;;
|
"hpc") launch_session "hpc" ;;
|
||||||
|
"kermit-gpu") launch_session "kermit-gpu" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,3 +19,9 @@ host kobo
|
||||||
hostname 192.168.13.20
|
hostname 192.168.13.20
|
||||||
port 22
|
port 22
|
||||||
identityfile ~/.ssh/kobo
|
identityfile ~/.ssh/kobo
|
||||||
|
|
||||||
|
host kermit-gpu
|
||||||
|
user aminka
|
||||||
|
hostname bw26gpu1.ugent.be
|
||||||
|
port 4480
|
||||||
|
identityfile ~/.ssh/kermit-gpu
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -250,8 +250,6 @@ for_window [app_id="imv"] floating enable
|
||||||
for_window [app_id="popup"] floating enable, resize set 1280 720
|
for_window [app_id="popup"] floating enable, resize set 1280 720
|
||||||
for_window [app_id="firefox" title="^Picture-in-Picture$"] floating enable, resize set 735 415; sticky enable
|
for_window [app_id="firefox" title="^Picture-in-Picture$"] floating enable, resize set 735 415; sticky enable
|
||||||
for_window [title="(?:Open|Save) (?:File|Folder|As)"] floating enable, resize set width 1030 height 710
|
for_window [title="(?:Open|Save) (?:File|Folder|As)"] floating enable, resize set width 1030 height 710
|
||||||
# Resize zathura to 70% in tiling mode
|
|
||||||
for_window [app_id="org.pwmt.zathura" workspace=$workspace4] resize set width 70 ppt
|
|
||||||
# Resize R plots to 40% in tiling mode
|
# Resize R plots to 40% in tiling mode
|
||||||
for_window [class="R_x11"] resize set width 40 ppt
|
for_window [class="R_x11"] resize set width 40 ppt
|
||||||
# Split windows vertically
|
# Split windows vertically
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
session_name: kermit-gpu
|
||||||
|
suppress_history: false
|
||||||
|
|
||||||
|
windows:
|
||||||
|
- window_name: admin
|
||||||
|
focus: true
|
||||||
|
layout: even-vertical
|
||||||
|
panes:
|
||||||
|
- ssh -C kermit-gpu
|
||||||
|
- ssh -C kermit-gpu
|
||||||
|
|
||||||
|
- window_name: canvas
|
||||||
|
layout: even-vertical
|
||||||
|
panes:
|
||||||
|
- ssh -C kermit-gpu
|
||||||
|
- ssh -C kermit-gpu
|
||||||
|
|
||||||
|
- window_name: monitor
|
||||||
|
panes:
|
||||||
|
- ssh -C -t kermit-gpu "htop"
|
|
@ -25,10 +25,6 @@ windows:
|
||||||
panes:
|
panes:
|
||||||
- ncmpcpp
|
- ncmpcpp
|
||||||
|
|
||||||
- window_name: mail
|
|
||||||
panes:
|
|
||||||
- neomutt
|
|
||||||
|
|
||||||
- window_name: IM
|
- window_name: IM
|
||||||
panes:
|
panes:
|
||||||
- gomuks
|
- gomuks
|
||||||
|
|
Loading…
Reference in New Issue