Merge branch 'aymanbagabas-master'

This commit is contained in:
Luke Smith 2019-11-24 08:27:18 -05:00
commit 4542f27c2e
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252
4 changed files with 15 additions and 17 deletions

View File

@ -1,10 +1,8 @@
.POSIX: .POSIX:
OS = $(shell uname -s) OS = $(shell uname -s)
ifeq ($(OS), Darwin) ifndef PREFIX
PREFIX = /usr/local PREFIX = /usr/local
else
PREFIX = /usr
endif endif
MANPREFIX = $(PREFIX)/share/man MANPREFIX = $(PREFIX)/share/man
@ -18,16 +16,20 @@ install:
for shared in share/*; do \ for shared in share/*; do \
cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \ cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \
done done
if [ "$(OS)" = "Darwin" ]; then \
sed -iba 's/\/usr\//\/usr\/local\//' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \
rm $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \
fi
mkdir -p $(DESTDIR)$(MANPREFIX)/man1 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1 cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1
if [ "$(PREFIX)" ]; then \
sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \
sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/bin/mw; \
sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(MANPREFIX)/man1/mw.1; \
fi
if [ "$(OS)" = "Darwin" ]; then \
rm $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \
fi
uninstall: uninstall:
for script in bin/*; do \ for script in bin/*; do \
rm -f $(DESTDIR)$(PREFIX)/bin/$$script; \ rm -f $(DESTDIR)$(PREFIX)/$$script; \
done done
rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard
rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1 rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1

6
bin/mw
View File

@ -8,11 +8,7 @@ command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2"
} }
! command -v mbsync >/dev/null && printf "\`mbsync\` must be installed to run mutt-wizard.\\n" && exit ! command -v mbsync >/dev/null && printf "\`mbsync\` must be installed to run mutt-wizard.\\n" && exit
case "$(uname)" in prefix="/usr/local"
Linux) prefix="/usr" ;;
*) prefix="/usr/local" ;;
esac
muttdir="$HOME/.config/mutt" # Main mutt config location muttdir="$HOME/.config/mutt" # Main mutt config location
accdir="$muttdir/accounts" # Directory for account settings accdir="$muttdir/accounts" # Directory for account settings
maildir="$HOME/.local/share/mail" # Location of mail storage maildir="$HOME/.local/share/mail" # Location of mail storage

6
mw.1
View File

@ -60,10 +60,10 @@ will delete downloaded mail for for safety (and time)'s sake. If you want to del
.TP .TP
.B Default settings .B Default settings
The mutt-wizard has many default settings that focus on making it aesthetically pleasing and supplying more vim-like bindings. These can be found in The mutt-wizard has many default settings that focus on making it aesthetically pleasing and supplying more vim-like bindings. These can be found in
.I /usr/share/mutt-wizard/mutt-wizard.muttrc .I /usr/local/share/mutt-wizard/mutt-wizard.muttrc
and the default mailcap file can be found in and the default mailcap file can be found in
.I .I
/usr/share/mutt-wizard/mailcap. /usr/local/share/mutt-wizard/mailcap.
Any of these settings can be overwritten in Any of these settings can be overwritten in
.I ~/.config/mutt/muttrc, .I ~/.config/mutt/muttrc,
but be mindful that your overriding binds should appear after the but be mindful that your overriding binds should appear after the
@ -73,7 +73,7 @@ file is sourced.
.TP .TP
.B Detecting server settings .B Detecting server settings
mutt-wizard has a repository of email services and their server information kept in mutt-wizard has a repository of email services and their server information kept in
.I /usr/share/mutt-wizard/domains.csv .I /usr/local/share/mutt-wizard/domains.csv
which is used to automatically configure email settings. which is used to automatically configure email settings.
If your email provider is not found there, it will prompt you to input your email service's IMAP and SMTP server information which can usually be found by searching online. If your email provider is not found there, it will prompt you to input your email service's IMAP and SMTP server information which can usually be found by searching online.

View File

@ -3,7 +3,7 @@
# mutt-wizard will have this file sourced from your muttrc. # mutt-wizard will have this file sourced from your muttrc.
# In the interest of seamless updating, do not edit this file. # In the interest of seamless updating, do not edit this file.
# If you want to override any settings, set those in your muttrc. # If you want to override any settings, set those in your muttrc.
set mailcap_path = /usr/share/mutt-wizard/mailcap set mailcap_path = /usr/local/share/mutt-wizard/mailcap
set date_format="%y/%m/%d %I:%M%p" set date_format="%y/%m/%d %I:%M%p"
set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)" set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)"
set sort = 'reverse-date' set sort = 'reverse-date'