Merge branch 'dev' into mercury

dunst: change default font
mail: fix colors in light colorscheme
        fix $NOTMUCH-CONFIG
        add forge and velo subfolders for univ
        !!! change mailboxes dirnames
        add filters for univ
status: fix trailing spaces in sb-mailbox
sxhkd: use XF86 keys by default for volume
scripts: automatic cursor setup
This commit is contained in:
David JULIEN 2022-11-04 17:57:24 +01:00
commit 4b057bcba5
12 changed files with 100 additions and 40 deletions

View File

@ -109,7 +109,7 @@
### Text ###
font = Fira Code 12
font = FiraCode 12
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.

View File

@ -10,10 +10,10 @@ CertificateFile /etc/ssl/certs/ca-certificates.crt
MaildirStore david.julien@posteo.net-local
Subfolders Verbatim
Path /home/swytch/.local/share/mail/david.julien@posteo.net/
Inbox /home/swytch/.local/share/mail/david.julien@posteo.net/INBOX
Path /home/swytch/.local/share/mail/posteo/
Inbox /home/swytch/.local/share/mail/posteo/INBOX
Channel david.julien@posteo.net
Channel posteo
Expunge Both
Far :david.julien@posteo.net-remote:
Near :david.julien@posteo.net-local:
@ -36,10 +36,10 @@ CertificateFile /etc/ssl/certs/ca-certificates.crt
MaildirStore david.julien@univ-nantes.fr-local
Subfolders Verbatim
Path /home/swytch/.local/share/mail/david.julien@univ-nantes.fr/
Inbox /home/swytch/.local/share/mail/david.julien@univ-nantes.fr/INBOX
Path /home/swytch/.local/share/mail/univ/
Inbox /home/swytch/.local/share/mail/univ/INBOX
Channel david.julien@univ-nantes.fr
Channel univ
Expunge Both
Far :david.julien@univ-nantes.fr-remote:
Near :david.julien@univ-nantes.fr-local:
@ -62,10 +62,10 @@ CertificateFile /etc/ssl/certs/ca-certificates.crt
MaildirStore david.julien@mailo.com-local
Subfolders Verbatim
Path /home/swytch/.local/share/mail/david.julien@mailo.com/
Inbox /home/swytch/.local/share/mail/david.julien@mailo.com/INBOX
Path /home/swytch/.local/share/mail/mailo/
Inbox /home/swytch/.local/share/mail/mailo/INBOX
Channel david.julien@mailo.com
Channel mailo
Expunge Both
Far :david.julien@mailo.com-remote:
Near :david.julien@mailo.com-local:

View File

@ -1,4 +1,4 @@
account david.julien@posteo.net
account posteo
host posteo.de
port 587
from david.julien@posteo.net
@ -9,7 +9,7 @@ tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /home/swytch/.config/msmtp/msmtp.log
account david.julien@univ-nantes.fr
account univ
host smtp.etu.univ-nantes.fr
port 587
from david.julien@univ-nantes.fr
@ -20,7 +20,7 @@ tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /home/swytch/.config/msmtp/msmtp.log
account david.julien@mailo.com
account mailo
host mail.mailo.com
port 587
from david.julien@mailo.com

View File

@ -2,11 +2,11 @@
# muttrc file for account email@adress.you
set realname = "David JULIEN"
set from = "david.julien@posteo.net"
set sendmail = "msmtp -a david.julien@posteo.net"
set sendmail = "msmtp -a posteo"
alias me david.julien <david.julien@posteo.net>
set folder = "$XDG_DATA_HOME/mail/david.julien@posteo.net"
set header_cache = "$XDG_CACHE_HOME/neomutt/david.julien@posteo.net/headers"
set message_cachedir = "$XDG_CACHE_HOME/neomutt/david.julien@posteo.net/bodies"
set folder = "$XDG_DATA_HOME/mail/posteo"
set header_cache = "$XDG_CACHE_HOME/neomutt/posteo/headers"
set message_cachedir = "$XDG_CACHE_HOME/neomutt/posteo/bodies"
set mbox_type = Maildir
set crypt_autosign = yes

View File

@ -2,11 +2,11 @@
# muttrc file for account david.julien@univ-nantes.fr
set realname = "David JULIEN"
set from = "david.julien@univ-nantes.fr"
set sendmail = "msmtp -a david.julien@univ-nantes.fr"
set sendmail = "msmtp -a univ"
alias me david.julien <david.julien@univ-nantes.fr>
set folder = "$XDG_DATA_HOME/mail/david.julien@univ-nantes.fr"
set header_cache = "$XDG_CACHE_HOME/neomutt/david.julien@univ-nantes.fr/headers"
set message_cachedir = "$XDG_CACHE_HOME/neomutt/david.julien@univ-nantes.fr/bodies"
set folder = "$XDG_DATA_HOME/mail/univ"
set header_cache = "$XDG_CACHE_HOME/neomutt/univ/headers"
set message_cachedir = "$XDG_CACHE_HOME/neomutt/univ/bodies"
set mbox_type = Maildir
set crypt_autosign = yes
@ -24,7 +24,7 @@ set signature="$XDG_CONFIG_HOME/neomutt/accounts/nantes.signature"
unmacro index o
macro index o "<shell-escape>mailsync<enter>" "run mbsync to sync david.julien@univ-nantes.fr"
mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=thesis" "=admin" "=login" "=publications" "=teaching" "=teaching/X11I020" "=teaching/X11I040"
mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=thesis" "=publications" "=teaching" "=teaching/X11I020" "=teaching/X11I040" "=forge" "=velo" "=admin" "=login"
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"
@ -44,6 +44,12 @@ 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 gf "<change-folder>=forge<enter>" "go to forge"
macro index,pager Mf ";<save-message>=forge<enter>" "move mail to forge"
macro index,pager Cf ";<copy-message>=forge<enter>" "copy mail to forge"
macro index,pager gv "<change-folder>=velo<enter>" "go to velo"
macro index,pager Mv ";<save-message>=velo<enter>" "move mail to velo"
macro index,pager Cv ";<copy-message>=velo<enter>" "copy mail to velo"
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"

View File

@ -2,11 +2,11 @@
# muttrc file for account email@adress.you
set realname = "David JULIEN"
set from = "david.julien@mailo.com"
set sendmail = "msmtp -a david.julien@mailo.com"
set sendmail = "msmtp -a mailo"
alias me david.julien <david.julien@mailo.com>
set folder = "$XDG_DATA_HOME/mail/david.julien@mailo.com"
set header_cache = "$XDG_CACHE_HOME/neomutt/david.julien@mailo.com/headers"
set message_cachedir = "$XDG_CACHE_HOME/neomutt/david.julien@mailo.com/bodies"
set folder = "$XDG_DATA_HOME/mail/mailo"
set header_cache = "$XDG_CACHE_HOME/neomutt/mailo/headers"
set message_cachedir = "$XDG_CACHE_HOME/neomutt/mailo/bodies"
set mbox_type = Maildir
set crypt_autosign = yes

View File

@ -7,9 +7,9 @@ color index_number blue default
color index_subject cyan default '.*'
# New mail is boldened:
color index brightyellow black "~N"
color index_author brightred black "~N"
color index_subject brightcyan black "~N"
color index brightyellow default "~N"
color index_author brightred default "~N"
color index_subject brightblue default "~N"
# Tagged mail is highlighted:
color index brightyellow blue "~T"
@ -24,9 +24,9 @@ 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 sidebar_divider brightblack default
color sidebar_flagged red default
color sidebar_new green default
color normal brightyellow default
color error red default
color tilde black default
@ -34,7 +34,7 @@ color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightyellow black
color status brightyellow default
color hdrdefault brightgreen default
color quoted green default
color quoted1 blue default

View File

@ -0,0 +1,23 @@
#!/usr/bin/env sh
# The accounts to be cleaned
accounts="univ"
filter() {
notmuch search --output=files --format=text0 $parameters and tag:unread| xargs -0 --no-run-if-empty mv -t "$XDG_DATA_HOME/mail/$account/$tag/new/"
notmuch search --output=files --format=text0 $parameters and not tag:unread| xargs -0 --no-run-if-empty mv -t "$XDG_DATA_HOME/mail/$account/$tag/cur/"
}
for account in $accounts
do
notmuch tag --input $XDG_CONFIG_HOME/notmuch/tags/$account
tags_location="$XDG_CONFIG_HOME/notmuch/tags/$account"
tags="$(grep "+" "$tags_location" | sed -e 's/^.//' -e 's/ .*//')"
for tag in $tags
do
case $tag in
"+univ") ;;
*) parameters="folder:$account/INBOX and tag:$tag" && filter;;
esac
done
done

View File

@ -17,7 +17,7 @@ export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
export LESSHISTFILE="-"
export MBSYNCRC="$XDG_CONFIG_HOME/mbsync/config"
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/notmuchrc"
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config"
export NMBGIT="$XDG_DATA_HOME/notmuch/nmbug"
export ANDROID_PREFS_ROOT="$XDG_CONFIG_HOME/android"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"

31
.local/bin/cursor_setup Executable file
View File

@ -0,0 +1,31 @@
#!/usr/bin/env sh
######################################################################
# @author : swytch (adapted from Luke Smith - lukesmith.xyz)
# @file : cursor_setup
# @license : GPLv3
# @created : Friday Nov 04, 2022 10:02:12 CET
#
# @description : handles cursor setup in cas `xinput` lists the same
# device several times
######################################################################
if [ "$1" = "" ]; then
exit 1
fi
ids=$(xinput --list | awk -v search="$1" \
'$0 ~ search {match($0, /id=[0-9]+/);\
if (RSTART) \
print substr($0, RSTART+3, RLENGTH-3)\
}'\
)
for i in $ids
do
[ "trackpad" = "$2" ] && xinput set-prop $i 'libinput Tapping Enabled' 1 &
xinput set-prop $i 'libinput Natural Scrolling Enabled' 1 &
xinput set-prop $i 'libinput Accel Speed' 0.4 &
done

View File

@ -10,7 +10,7 @@
######################################################################
# Wifi quality percentage and  icon if ethernet is connected.
# Wifi ssid and  icon if ethernet is connected.
ssid="$(wpa_cli status | grep -i ^ssid | sed -e 's/.*=//')"
state="$(wpa_cli status | grep -i ^wpa_state | sed -e 's/.*=//')"
case "$state" in
@ -20,9 +20,9 @@ case "$state" in
esac
eth="$(cat /sys/class/net/enp0s31f6/operstate)"
if [ "up" = "$eth" ]; then
str="$(printf "%s /  " "$str")"
str="$(printf "%s / " "$str")"
fi
vpn="$(pidof openvpn)"
[ -n "$vpn" ] && str="$(printf "%s  " "$str")"
[ -n "$vpn" ] && str="$(printf "%s " "$str")"
printf " %s " "$str"

View File

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