Merge branch 'dev' into logos

displayselect: fix + update default setup
mail: use XDG_BASE_DIRECTORIES
      add @univ-nantes and its bindings
system: fix issues between JAVA and dwm
pass: update pass commands according to new layout
dotfiles: add gitignore
This commit is contained in:
David JULIEN 2022-10-17 19:15:21 +02:00
commit 52df431962
15 changed files with 159 additions and 67 deletions

View File

@ -2,4 +2,4 @@ allow-preset-passphrase
default-cache-ttl 604800
max-cache-ttl 604800
pinentry-program /usr/bin/pinentry
pinentry-program /usr/bin/pinentry-gtk-2

View File

@ -3,7 +3,7 @@ IMAPStore david.julien@posteo.net-remote
Host posteo.de
Port 993
User david.julien@posteo.net
PassCmd "pass david.julien@posteo.net"
PassCmd "pass posteo.net/david.julien"
AuthMechs LOGIN
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
@ -24,26 +24,25 @@ MaxMessages 0
ExpireUnread no
# End Profile
# University
IMAPStore david.julien@ens-lyon.fr-remote
Host imaps.ens-lyon.fr
IMAPStore david.julien@etu.univ-nantes.fr-remote
Host imaps.etu.univ-nantes.fr
Port 993
User djulien
PassCmd "pass ens-lyon.fr/djulien"
User E22D718J
PassCmd "pass univ-nantes.fr/E22D718J"
AuthMechs LOGIN
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
MaildirStore david.julien@ens-lyon.fr-local
MaildirStore david.julien@etu.univ-nantes.fr-local
Subfolders Verbatim
Path /home/swytch/.local/share/mail/david.julien@ens-lyon.fr/
Inbox /home/swytch/.local/share/mail/david.julien@ens-lyon.fr/INBOX
Path /home/swytch/.local/share/mail/david.julien@etu.univ-nantes.fr/
Inbox /home/swytch/.local/share/mail/david.julien@etu.univ-nantes.fr/INBOX
Channel david.julien@ens-lyon.fr
Channel david.julien@etu.univ-nantes.fr
Expunge Both
Far :david.julien@ens-lyon.fr-remote:
Near :david.julien@ens-lyon.fr-local:
Far :david.julien@etu.univ-nantes.fr-remote:
Near :david.julien@etu.univ-nantes.fr-local:
Patterns * !"[Gmail]/All Mail"
Create Both
SyncState *
@ -56,7 +55,7 @@ IMAPStore david.julien@mailo.com-remote
Host mail.mailo.com
Port 993
User david.julien@mailo.com
PassCmd "pass david.julien@mailo.com"
PassCmd "pass mailo.com/david.julien"
AuthMechs LOGIN
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt

View File

@ -3,18 +3,18 @@ host posteo.de
port 587
from david.julien@posteo.net
user david.julien@posteo.net
passwordeval "pass david.julien@posteo.net"
passwordeval "pass posteo.net/david.julien"
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /home/swytch/.config/msmtp/msmtp.log
account david.julien@ens-lyon.fr
host smtp.ens-lyon.fr
account david.julien@etu.univ-nantes.fr
host smtp.etu.univ-nantes.fr
port 587
from david.julien@ens-lyon.fr
user djulien
passwordeval "pass ens-lyon.fr/djulien"
from david.julien@etu.univ-nantes.fr
user E22D718J
passwordeval "pass univ-nantes.fr/E22D718J"
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
@ -25,7 +25,7 @@ host mail.mailo.com
port 587
from david.julien@mailo.com
user david.julien@mailo.com
passwordeval "pass david.julien@mailo.com"
passwordeval "pass mailo.com/david.julien"
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt

View File

@ -4,9 +4,9 @@ set realname = "David JULIEN"
set from = "david.julien@posteo.net"
set sendmail = "msmtp -a david.julien@posteo.net"
alias me david.julien <david.julien@posteo.net>
set folder = "/home/swytch/.local/share/mail/david.julien@posteo.net"
set header_cache = /home/swytch/.cache/mutt/david.julien@posteo.net/headers
set message_cachedir = /home/swytch/.cache/mutt/david.julien@posteo.net/bodies
set folder = "$XDG_DATA_HOME/mail/david.julien@posteo.net"
set header_cache = "$XDG_CACHE_HOME/mutt/david.julien@posteo.net/headers"
set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@posteo.net/bodies"
set mbox_type = Maildir
set crypt_autosign = yes
@ -19,7 +19,7 @@ bind index,pager C noop
bind index gg first-entry
unmailboxes *
unalternates *
set signature="/home/swytch/.config/mutt/accounts/posteo.signature"
set signature="$XDG_CONFIG_HOME/mutt/accounts/posteo.signature"
unmacro index o
macro index o "<shell-escape>mailsync<enter>" "run mbsync to sync david.julien@posteo.net"

View File

@ -4,9 +4,9 @@ set realname = "David JULIEN"
set from = "david.julien@ens-lyon.fr"
set sendmail = "msmtp -a david.julien@ens-lyon.fr"
alias me david.julien <david.julien@ens-lyon.fr>
set folder = "/home/swytch/.local/share/mail/david.julien@ens-lyon.fr"
set header_cache = /home/swytch/.cache/mutt/david.julien@ens-lyon.fr/headers
set message_cachedir = /home/swytch/.cache/mutt/david.julien@ens-lyon.fr/bodies
set folder = "$XDG_DATA_HOME/mail/david.julien@ens-lyon.fr"
set header_cache = "$XDG_CACHE_HOME/mutt/david.julien@ens-lyon.fr/headers"
set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@ens-lyon.fr/bodies"
set mbox_type = Maildir
set crypt_autosign = yes
@ -19,11 +19,11 @@ bind index,pager C noop
bind index gg first-entry
unmailboxes *
unalternates *
set signature="/home/swytch/.config/mutt/accounts/ens.signature"
set signature="$XDG_CONFIG_HOME/mutt/accounts/ens.signature"
unmacro index o
macro index o "<shell-escape>mailsync<enter>" "run mbsync to sync david.julien@ens-lyon.fr"
mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=internship" "=MOVEP" "=QEST" "=fanfare"
mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=thesis" "=MOVEP" "=QEST" "=fanfare"
set record = "+Sent"
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"

View File

@ -0,0 +1,51 @@
# vim: filetype=neomuttrc
# muttrc file for account david.julien@etu.univ-nantes.fr
set realname = "David JULIEN"
set from = "david.julien@etu.univ-nantes.fr"
set sendmail = "msmtp -a david.julien@etu.univ-nantes.fr"
alias me david.julien <david.julien@etu.univ-nantes.fr>
set folder = "$XDG_DATA_HOME/mail/david.julien@etu.univ-nantes.fr"
set header_cache = "$XDG_CACHE_HOME/mutt/david.julien@etu.univ-nantes.fr/headers"
set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@etu.univ-nantes.fr/bodies"
set mbox_type = Maildir
set crypt_autosign = yes
set pgp_sign_as = "0x70F6BD57D3BD8027"
bind index,pager gg noop
bind index,pager g noop
bind index,pager M noop
bind index,pager C noop
bind index gg first-entry
unmailboxes *
unalternates *
set signature="$XDG_CONFIG_HOME/mutt/accounts/nantes.signature"
unmacro index o
macro index o "<shell-escape>mailsync<enter>" "run mbsync to sync david.julien@etu.univ-nantes.fr"
mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=thesis"
set record = "+Sent"
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent"
set postponed = "+Drafts"
macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts"
macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts"
macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash"
macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash"
set trash = "+Trash"
macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox"
macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox"
macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox"
set spoolfile = "+INBOX"
macro index,pager gT "<change-folder>=thesis<enter>" "go to thesis"
macro index,pager MT ";<save-message>=thesis<enter>" "move mail to thesis"
macro index,pager CT ";<copy-message>=thesis<enter>" "copy mail to thesis"
macro index,pager ga "<change-folder>=admin<enter>" "go to admin"
macro index,pager Ma ";<save-message>=admin<enter>" "move mail to admin"
macro index,pager Ca ";<copy-message>=admin<enter>" "copy mail to admin"
macro index,pager gl "<change-folder>=login<enter>" "go to login"
macro index,pager Ml ";<save-message>=login<enter>" "move mail to login"
macro index,pager Cl ";<copy-message>=login<enter>" "copy mail to login"

View File

@ -4,9 +4,9 @@ set realname = "David JULIEN"
set from = "david.julien@mailo.com"
set sendmail = "msmtp -a david.julien@mailo.com"
alias me david.julien <david.julien@mailo.com>
set folder = "/home/swytch/.local/share/mail/david.julien@mailo.com"
set header_cache = /home/swytch/.cache/mutt/david.julien@mailo.com/headers
set message_cachedir = /home/swytch/.cache/mutt/david.julien@mailo.com/bodies
set folder = "$XDG_DATA_HOME/mail/david.julien@mailo.com"
set header_cache = "$XDG_CACHE_HOME/mutt/david.julien@mailo.com/headers"
set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@mailo.com/bodies"
set mbox_type = Maildir
set crypt_autosign = yes
@ -19,7 +19,7 @@ bind index,pager C noop
bind index gg first-entry
unmailboxes *
unalternates *
set signature="/home/swytch/.config/mutt/accounts/mailo.signature"
set signature="$XDG_CONFIG_HOME/mutt/accounts/mailo.signature"
unmacro index o
macro index o "<shell-escape>mailsync<enter>" "run mbsync to sync david.julien@mailo.com"

View File

@ -4,9 +4,9 @@ set realname = "Smecta"
set from = "david.julien@centrale-marseille.fr"
set sendmail = "msmtp -a david.julien@centrale-marseille.fr"
alias me david.julien <david.julien@centrale-marseille.fr>
set folder = "/home/swytch/.local/share/mail/david.julien@centrale-marseille.fr"
set header_cache = /home/swytch/.cache/mutt/david.julien@centrale-marseille.fr/headers
set message_cachedir = /home/swytch/.cache/mutt/david.julien@centrale-marseille.fr/bodies
set folder = "$XDG_DATA_HOME/mail/david.julien@centrale-marseille.fr"
set header_cache = "$XDG_CACHE_HOME/mutt/david.julien@centrale-marseille.fr/headers"
set message_cachedir = "$XDG_CACHE_HOME/mutt/david.julien@centrale-marseille.fr/bodies"
set mbox_type = Maildir
set crypt_autosign = no
@ -19,7 +19,7 @@ bind index,pager C noop
bind index gg first-entry
unmailboxes *
unalternates *
set signature="/home/swytch/.config/mutt/accounts/centrale.signature"
set signature="$XDG_CONFIG_HOME/mutt/accounts/centrale.signature"
unmacro index o
macro index o "<shell-escape>mailsync<enter>" "run mbsync to sync david.julien@centrale-marseille.fr"

View File

@ -0,0 +1,7 @@
David JULIEN
Doctorant au LS2N (Nantes)
Équipe VELO
Faculté de Sciences et Techniques
Bâtiment 11 - Bureau 221

View File

@ -1,7 +1,7 @@
# vim: filetype=neomuttrc
source /home/swytch/.config/mutt/neomutt.muttrc
macro index,pager ip '<sync-mailbox><enter-command>source /home/swytch/.config/mutt/accounts/1-david.julien@posteo.net.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to david.julien@posteo.net"
macro index,pager is '<sync-mailbox><enter-command>source /home/swytch/.config/mutt/accounts/2-david.julien@ens-lyon.fr.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to david.julien@ens-lyon.fr"
macro index,pager im '<sync-mailbox><enter-command>source /home/swytch/.config/mutt/accounts/3-david.julien@mailo.com.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to david.julien@mailto.com"
macro index,pager ic '<sync-mailbox><enter-command>source /home/swytch/.config/mutt/accounts/4-david.julien@centrale-marseille.fr.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to david.julien@centrale-marseille.fr"
source /home/swytch/.config/mutt/accounts/2-david.julien@ens-lyon.fr.muttrc
source $XDG_CONFIG_HOME/mutt/neomutt.muttrc
macro index,pager ip '<sync-mailbox><enter-command>source $XDG_CONFIG_HOME/mutt/accounts/1-david.julien@posteo.net.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to david.julien@posteo.net"
macro index,pager is '<sync-mailbox><enter-command>source $XDG_CONFIG_HOME/mutt/accounts/2-david.julien@ens-lyon.fr.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to david.julien@ens-lyon.fr"
macro index,pager in '<sync-mailbox><enter-command>source $XDG_CONFIG_HOME/mutt/accounts/2-david.julien@etu.univ-nantes.fr.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to david.julien@etu.univ-nantes.fr"
macro index,pager im '<sync-mailbox><enter-command>source $XDG_CONFIG_HOME/mutt/accounts/3-david.julien@mailo.com.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to david.julien@mailto.com"
source $XDG_CONFIG_HOME/mutt/accounts/2-david.julien@etu.univ-nantes.fr.muttrc

View File

@ -9,8 +9,8 @@ set date_format="%d/%m/%y %I:%M%p"
set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)"
set sort = 'reverse-date'
set smtp_authenticators = 'gssapi:login'
set my_abook = "abook --config /home/swytch/.config/abook/abookrc --datafile \
/home/swytch/.local/share/abook/addressbook"
set my_abook = "abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile \
$XDG_DATA_HOME/abook/addressbook"
set query_command = "$my_abook --mutt-query '%s'"
set rfc2047_parameters = yes
set sleep_time = 0 # Pause 0 seconds for informational messages

View File

@ -35,3 +35,7 @@ export BROWSER="firefox"
export IRC_CLIENT="irssi"
export MAIL_CLIENT="neomutt"
export MUSIC_CLIENT="ncmpcpp"
## misc
export _JAVA_AWT_WM_NONREPARENTING=1
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java

25
.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
/*
!/.pam_environment
!/.gitignore
!/.xprofile
!/.zshenv
!/.local/bin/
!/local/src/
!/.local/state/
!/.config/
/.config/dconf/
/.config/font-manager/
/.config/fontconfig/
/.config/gnupg/
!/.config/gnupg/gpg-agent.conf
/.config/libreoffice/
/.config/mpd/
!/.config/mpd/mpd.conf
/.config/mutt/.mailsynclastrun
/.config/nvim/plugin/
/.config/pulse/
/.config/zsh/.zcompdump
/**/*.log

View File

@ -16,7 +16,7 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
# version for the internal display
if [ "$mirror" = "yes" ]; then
external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:")
internal=$(echo "$screens" | grep -v "$external")
internal=$(echo "$screens" | grep -v -w "$external")
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
tail -n 1 | awk '{print $1}')
@ -35,46 +35,52 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
--output "$internal" --auto --same-as "$external" \
--scale "$scale_x"x"$scale_y"
else
default=$(printf "yes\\nno" | dmenu -i -p "Default settings?")
if [ $default = "no" ]; then
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
rotation=$(printf "normal\\nleft\\nright" | dmenu -i -p "Rotate $secondary?")
xrandr --output "$primary" --auto --scale 1.0x1.0 \
--output "$secondary" --"$direction"-of "$primary" --auto --scale 1.2x1.2 --rotate $rotation
else
xrandr --fb 3840x1080 \
--output "eDP1" --mode 1920x1080 --pos 1920x0\
--output "HDMI2" --pos 0x0
fi
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v -w "$primary")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
rotation=$(printf "normal\\nleft\\nright" | dmenu -i -p "Rotate $secondary?")
setup
fi
}
default() {
primary=$(echo "$allposs" | grep -w "connected primary" | awk '{printf $1}')
secondary=$(echo "$screens" | grep -v -w "$primary")
direction="left"
rotation="normal"
setup
}
setup() {
xrandr --output "$primary" --auto --scale 1.0x1.0 \
--output "$secondary" --"$direction"-of "$primary" --auto
}
morescreen() { # If multi-monitor is selected and there are more than two screens.
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:")
secondary=$(echo "$screens" | grep -v -w "$primary" | dmenu -i -p "Select secondary display:")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:")
tertiary=$(echo "$screens" | grep -v -w "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:")
xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto
}
multimon() { # Multi-monitor handler.
case "$(echo "$screens" | wc -l)" in
1) xrandr $(echo "$allposs" | grep -v "$screens" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
1) xrandr $(echo "$allposs" | grep -v -w "$screens" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
2) twoscreen ;;
*) morescreen ;;
esac ;}
# Get all possible displays
allposs=$(xrandr -q | grep "connected")
allposs=$(xrandr -q | grep -w "connected")
# Get all connected screens.
screens=$(echo "$allposs" | grep " connected" | awk '{print $1}')
screens=$(echo "$allposs" | awk '{print $1}')
# Get user choice including multi-monitor and manual selection:
chosen=$(printf "multi-monitor\\n%s\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
chosen=$(printf "default\\n\\nmulti-monitor\\n%s\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
case "$chosen" in
"default") default ;;
"manual selection") arandr ; exit ;;
"multi-monitor") multimon ;;
*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;

View File

@ -16,7 +16,7 @@ do
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/*/new/ -type f | grep -iv "trash" | wc -l 2>/dev/null)"
if [ $new -gt 0 ]; then
[ -n "$(echo "$acc" | sed -n '/@centrale/p')" ] && box=""
[ -n "$(echo "$acc" | sed -n '/@ens/p')" ] && box=""
[ -n "$(echo "$acc" | sed -n '/@etu/p')" ] && box=""
[ -n "$(echo "$acc" | sed -n '/@mailo/p')" ] && box=""
[ -n "$(echo "$acc" | sed -n '/@posteo/p')" ] && box=""
unread="$unread/$box$new"