diff options
author | Luke Smith <luke@lukesmith.xyz> | 2018-06-26 10:58:50 -0400 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2018-06-26 10:58:50 -0400 |
commit | 183979f077a173e7649c6b5d4b87075fc2b30786 (patch) | |
tree | 113ee7ee523c14ba33c8a8f6cb32e93413b66787 | |
parent | 698d0052f0c616fa3c393634ca201be83596875b (diff) | |
parent | cbb6550df1ae17236b53b46c4502a509ee2dd3de (diff) |
Merge branch 'm3tax-master'
-rwxr-xr-x | mutt-wizard.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mutt-wizard.sh b/mutt-wizard.sh index a81c83c..03ad81a 100755 --- a/mutt-wizard.sh +++ b/mutt-wizard.sh @@ -20,7 +20,7 @@ chooseSync() { (cat /var/run/crond.pid && testSync) || dialog --msgbox "No cron testSync() { (crontab -l | grep .config/mutt/etc/mailsync && removeSync) || addSync ;} addSync() { min=$(dialog --inputbox "How many minutes should be between mail syncs?" 8 60 3>&1 1>&2 2>&3 3>&-) - (crontab -l; echo "*/$min * * * * export DISPLAY=:0.0 && $HOME/.config/mutt/etc/mailsync.sh") | crontab - && + (crontab -l; echo "*/$min * * * * eval \"export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME -x i3)/environ)\"; $HOME/.config/mutt/etc/mailsync.sh") | crontab - && dialog --msgbox "Cronjob successfully added. Remember you may need to restart or tell systemd/etc. to start your cron manager for this to take effect." 7 60 ;} removeSync() { ((crontab -l | sed -e '/.config\/mutt\/etc\/mailsync/d') | crontab - >/dev/null) && dialog --msgbox "Cronjob successfully removed. To reactivate, select this option again." 6 60 ;} |