mail and address scripts

This commit is contained in:
Adrian Amaglio 2022-03-11 13:43:53 +01:00
parent d49f19e48b
commit 90d2373ee2
2 changed files with 6 additions and 1 deletions

View File

@ -2,4 +2,4 @@
khard email "$@" | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b"
s="$@"
[ "$#" -gt 0 ] && notmuch address "$@" | grep -i "$s"
[ "$#" -gt 0 ] && notmuch address "$s" | grep -i "$s"

5
emails Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
# We setup xauthority file to display stuff
xauthority="$(cat ~/.Xauthority)"
exec sudo -u emails sh -c "echo \"$xauthority\" > ~/.Xauthority && . ~/.bashrc && exec aerc"