From 600a53dbdc0a4bc74b7fd485e14eef036272d644 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 11 Feb 2018 10:42:26 -0700 Subject: [PATCH] settings wiper, accounts bug fixed? --- .gitignore | 1 + mutt_install.sh | 1 + muttrc | 4 ++-- wipe_settings.sh | 12 ++++++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100755 wipe_settings.sh diff --git a/.gitignore b/.gitignore index 96dc46e..15dab7b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.swp *.gpg accounts/ *.pyc diff --git a/mutt_install.sh b/mutt_install.sh index 8ec9e34..0f97abe 100755 --- a/mutt_install.sh +++ b/mutt_install.sh @@ -69,6 +69,7 @@ echo -e "1\n2\n3\n4\n5\n6\n7\n8\n9" > /tmp/mutt_all_possible idnum=$(diff /tmp/mutt_all_possible /tmp/mutt_used | sed -n 2p | awk '{print $2}') addAccount() { + mkdir -p "$muttdir"accounts/ # First, adding the encrypted password. dialog --title "Luke's mutt/offlineIMAP password wizard" --passwordbox "Enter the password for the \"$title\" account." 10 60 2> /tmp/$title gpg -r $youremail --encrypt /tmp/$title diff --git a/muttrc b/muttrc index 06628f0..279a220 100644 --- a/muttrc +++ b/muttrc @@ -1,6 +1,8 @@ # vim: filetype=muttrc # This is the general mutt config which has the settings that all accounts use. source etc/muttcol +bind index,pager i noop +bind index,pager g noop source personal.muttrc set sleep_time = 0 set sort = 'reverse-date' @@ -13,8 +15,6 @@ set date_format="%m/%d %I:%M" set index_format="%2C %Z %D %-15.15F %s (%-4.4c)" set markers = no set mark_old = no -bind index,pager i noop -bind index,pager g noop auto_view text/html auto_view application/pdf alternative_order text/plain text/enriched text/html diff --git a/wipe_settings.sh b/wipe_settings.sh new file mode 100755 index 0000000..bfdd8b8 --- /dev/null +++ b/wipe_settings.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +muttdir="$HOME/.config/mutt/" + +wipe () { rm $HOME/.offlineimaprc +rm -rf "$muttdir"/accounts +rm -f "$muttdir"credentials/*gpg +rm "$muttdir"personal.muttrc ;} + +(dialog --defaultno --title "Wipe all custom neomutt/offlineIMAP settings?" --yesno "Would you like to wipe all of the mutt/offlineIMAP settings generated by the system?" 6 60 && wipe) || clear && exit + +clear