From 07276f5d246bd5683c17873a7d203bee967894ba Mon Sep 17 00:00:00 2001 From: thehnm Date: Wed, 1 Jul 2020 12:20:00 +0200 Subject: [PATCH] Use config variable in mw --- bin/mw | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/mw b/bin/mw index 7d7e15d..886dd78 100755 --- a/bin/mw +++ b/bin/mw @@ -16,8 +16,9 @@ maildir="$HOME/.local/share/mail" # Location of mail storage namere="^[a-z_][a-z0-9_-]*$" # Regex to ensure viable username emailre=".\+@.\+\\..\+" # Regex to confirm valid email address muttshare="$prefix/share/mutt-wizard" -[ -d "$HOME/.config/isync" ] && mkdir -p $HOME/.config/isync -mbsyncrc="$HOME/.config/isync/mbsyncrc" +confighome=${XDG_CONFIG_HOME:=$HOME/.config} # Use already defined directory for config files or use default one +[ -d "$confighome/isync" ] && mkdir -p "$confighome"/isync +mbsyncrc="$confighome/isync/mbsyncrc" mwconfig="$muttshare/mutt-wizard.muttrc" cachedir="$HOME/.cache/mutt-wizard" muttrc="$muttdir/muttrc"