settings wiper, accounts bug fixed?

This commit is contained in:
Luke 2018-02-11 10:42:26 -07:00
parent 0524f25548
commit 600a53dbdc
4 changed files with 16 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.swp
*.gpg *.gpg
accounts/ accounts/
*.pyc *.pyc

View File

@ -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}') idnum=$(diff /tmp/mutt_all_possible /tmp/mutt_used | sed -n 2p | awk '{print $2}')
addAccount() { addAccount() {
mkdir -p "$muttdir"accounts/
# First, adding the encrypted password. # 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 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 gpg -r $youremail --encrypt /tmp/$title

4
muttrc
View File

@ -1,6 +1,8 @@
# vim: filetype=muttrc # vim: filetype=muttrc
# This is the general mutt config which has the settings that all accounts use. # This is the general mutt config which has the settings that all accounts use.
source etc/muttcol source etc/muttcol
bind index,pager i noop
bind index,pager g noop
source personal.muttrc source personal.muttrc
set sleep_time = 0 set sleep_time = 0
set sort = 'reverse-date' 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 index_format="%2C %Z %D %-15.15F %s (%-4.4c)"
set markers = no set markers = no
set mark_old = no set mark_old = no
bind index,pager i noop
bind index,pager g noop
auto_view text/html auto_view text/html
auto_view application/pdf auto_view application/pdf
alternative_order text/plain text/enriched text/html alternative_order text/plain text/enriched text/html

12
wipe_settings.sh Executable file
View File

@ -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