From 90d2373ee21b46a1bc4c8c8ece1f0d7c55259928 Mon Sep 17 00:00:00 2001 From: Adrian Amaglio Date: Fri, 11 Mar 2022 13:43:53 +0100 Subject: [PATCH] mail and address scripts --- address | 2 +- emails | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 emails diff --git a/address b/address index 4976aa2..3d4d4de 100755 --- a/address +++ b/address @@ -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" diff --git a/emails b/emails new file mode 100755 index 0000000..aab9db4 --- /dev/null +++ b/emails @@ -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"