From cd5fd9bde283454bb64549bb064ecd3d50500d23 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Mon, 1 Jul 2019 18:14:16 -0400 Subject: Make use of PREFIX environment variable This patch puts the environment variable PREFIX in more use. If specified, mull-wizard Makefile substitute all instances of prefix with the provided environment variable. Signed-off-by: Ayman Bagabas --- Makefile | 14 ++++++++------ bin/mw | 6 +----- mw.1 | 6 +++--- share/mutt-wizard.muttrc | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 68db4ff..c0a6a05 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,8 @@ .POSIX: OS = $(shell uname -s) -ifeq ($(OS), Darwin) +ifndef PREFIX PREFIX = /usr/local -else - PREFIX = /usr endif MANPREFIX = $(PREFIX)/share/man @@ -18,12 +16,16 @@ install: for shared in share/*; do \ cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \ done + mkdir -p $(DESTDIR)$(MANPREFIX)/man1 + 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 \ - 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 - cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1 uninstall: for script in bin/*; do \ diff --git a/bin/mw b/bin/mw index 651dd90..3268fa5 100755 --- a/bin/mw +++ b/bin/mw @@ -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 -case "$(uname)" in - Linux) prefix="/usr" ;; - *) prefix="/usr/local" ;; -esac - +prefix="/usr/local" muttdir="$HOME/.config/mutt" # Main mutt config location accdir="$muttdir/accounts" # Directory for account settings maildir="$HOME/.local/share/mail" # Location of mail storage diff --git a/mw.1 b/mw.1 index b60cbf8..2f04a48 100644 --- a/mw.1 +++ b/mw.1 @@ -60,10 +60,10 @@ will delete downloaded mail for for safety (and time)'s sake. If you want to del .TP .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 -.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 .I -/usr/share/mutt-wizard/mailcap. +/usr/local/share/mutt-wizard/mailcap. Any of these settings can be overwritten in .I ~/.config/mutt/muttrc, but be mindful that your overriding binds should appear after the @@ -73,7 +73,7 @@ file is sourced. .TP .B Detecting server settings 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. 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. diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc index 1ca0503..bd20d50 100644 --- a/share/mutt-wizard.muttrc +++ b/share/mutt-wizard.muttrc @@ -3,7 +3,7 @@ # mutt-wizard will have this file sourced from your muttrc. # In the interest of seamless updating, do not edit this file. # 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 certificate_file = ~/.cache/mutt-wizard/certificates set date_format="%y/%m/%d %I:%M%p" set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)" -- cgit v1.2.3 From 04528a0fb92ea57be040a7ed87901d8186c970ff Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Mon, 1 Jul 2019 19:18:36 -0400 Subject: Fix make uninstall for loop directory wildcard includes the directory name. No need to specify the dir name when removing file. Signed-off-by: Ayman Bagabas --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c0a6a05..7c95b7f 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ install: uninstall: for script in bin/*; do \ - rm -f $(DESTDIR)$(PREFIX)/bin/$$script; \ + rm -f $(DESTDIR)$(PREFIX)/$$script; \ done rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard -- cgit v1.2.3 From ce78b37dc21ebe8436e1f0639942847ef56d8f4c Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 26 Oct 2019 12:46:54 -0400 Subject: lynx gives more loyal rendering of some html pages --- README.md | 2 +- share/mailcap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e1e58e7..d6ffa33 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ There's a chance of errors if you use a slow-release distro like Ubuntu, Debian ### Optional -- `w3m` - view HTML email and images in neomutt. +- `lynx` - view HTML email in neomutt. - `notmuch` - index and search mail. Install it and run `notmuch setup`, tell it that your mail is in `~/.local/share/mail/` (although `mw` will do this automatically if you haven't set notmuch up before). You can run it in mutt with `ctrl-f`. Run `notmuch new` to process new mail, although the included `mailsync` script does this for you. - `libnotify`/`libnotify-bin` - allows notifications when syncthing mail with `mailsync` - `abook` - a terminal-based address book. Pressing tab while typing an address to send mail to will suggest contacts that are in your abook. diff --git a/share/mailcap b/share/mailcap index a265aa4..9687b75 100644 --- a/share/mailcap +++ b/share/mailcap @@ -1,6 +1,6 @@ text/plain; $EDITOR %s ; text/html; openfile %s ; nametemplate=%s.html -text/html; w3m -I %{charset} -T text/html; copiousoutput; +text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput; image/*; muttimage %s ; copiousoutput video/*; setsid mpv --quiet %s &; copiousoutput application/pdf; openfile %s ; -- cgit v1.2.3 From ff57bd2eb785ea393fd569751c47b93339af7861 Mon Sep 17 00:00:00 2001 From: Wayne Reeves Date: Fri, 8 Nov 2019 19:01:41 -0600 Subject: Fix Malformed UTF-8 Character in Mailsync fixes #322 (#323) * line 5 defined the variable DBUS_SESSION_BUS_ADDRESS before exporting it in the next line * change the pgrep line * Revert "Update domains.csv (#321)" This reverts commit a92c01e13121f42b9f9b8962ae2c07b0a0ce5d4d. * Revert "Revert "Update domains.csv (#321)"" This reverts commit af0c0826b9a699780256dc8492e74a157cab2a85. * Revert "line 5 defined the variable DBUS_SESSION_BUS_ADDRESS before exporting it in the next line" This reverts commit ca64a6ae56a31ead28cc638d8d8dac7e28f9df68. * Revert "Revert "line 5 defined the variable DBUS_SESSION_BUS_ADDRESS before exporting it in the next line"" This reverts commit 4304eb731c109289251e06ef86377d372cef07e4. --- bin/mailsync | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/mailsync b/bin/mailsync index d79507d..c56ccb2 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -2,12 +2,13 @@ # Sync mail and give notification if there is new mail. export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus +DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus +export DBUS_SESSION_BUS_ADDRESS export DISPLAY=:0.0 [ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store" # Run only if user logged in (prevent cron errors) -pgrep -u "$USER" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;} +pgrep -u "${USER:=$LOGNAME}" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;} # Run only if not already running in other instance pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;} -- cgit v1.2.3 From b3ab7aacf8357cd6247084fe5e869b46ba9bac6c Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 12 Nov 2019 06:18:51 -0500 Subject: pseudomailboxes fix --- bin/mw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mw b/bin/mw index a89d5ef..5e03606 100755 --- a/bin/mw +++ b/bin/mw @@ -242,7 +242,7 @@ finalize() { \ trash=$(echo "$boxes" | grep -i -m 1 trash | sed 's/=/+/g') sed -ibu "/^mailboxes\|^set record\|^set postponed\|^set trash\|^set spoolfile/d" "$accdir/$idnum-$title.muttrc" ; rm -f "$accdir/$idnum-$title.muttrcbu" { echo "set spoolfile = \"$spoolfile\""; echo "set record = \"$record\""; echo "set postponed = \"$postponed\""; echo "set trash = \"$trash\""; } >> "$accdir/$idnum-$title.muttrc" - echo "mailboxes =$title ===================== $(echo "$boxes" | sed -e "s/^\|$/\"/g" | tr "\n" " ")" >> "$accdir/$idnum-$title.muttrc" + echo "mailboxes $(echo "$boxes" | sed -e "s/^\|$/\"/g" | tr "\n" " ")" >> "$accdir/$idnum-$title.muttrc" printf "Setting up your keyboard shortcuts for jumping between mailboxes...\\n" sed -ibu "/# mw-autogenerated/d" "$accdir/$idnum-$title.muttrc" ; rm -f "$accdir/$idnum-$title.muttrcbu" echo "$boxes" | grep -i inbox | head -n 1 | formatShortcut i inbox -- cgit v1.2.3 From 8a41a9a39966e269635731dad06b1c868ca2960c Mon Sep 17 00:00:00 2001 From: jgwatkins Date: Sat, 16 Nov 2019 18:48:53 -0800 Subject: added icloud.com server info (#330) --- share/domains.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/share/domains.csv b/share/domains.csv index 970a321..0c3dfcb 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -1,4 +1,5 @@ ADDRESS,IMAP,imap port,SMTP,smtp port +icloud.com,imap.mail.me.com,993,smtp.mail.me.com,587 420blaze.it,mail.cock.li,993,mail.cock.li,587 8chan.co,mail.cock.li,993,mail.cock.li,587 aaathats3as.com,mail.cock.li,993,mail.cock.li,587 -- cgit v1.2.3 From c81a1bd5251c7082fc58e7714d2b1aede664abd5 Mon Sep 17 00:00:00 2001 From: Jensun Ravichandran Date: Fri, 22 Nov 2019 11:45:01 +0100 Subject: Update domains.csv with hs-mittweida mail (#336) hs-mittweida.de,mail.hs-mittweida.de,993,mail.hs-mittweida.de,465 --- share/domains.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/share/domains.csv b/share/domains.csv index 0c3dfcb..11c95d2 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -279,3 +279,4 @@ yandex.ua,imap.yandex.com,993,smtp.yandex.com,587 zoho.com,imap.zoho.com,993,smtp.zoho.com,465 polito.it,mail.polito.it,993,mail.polito.it,465 studio.unibo.it,outlook.office365.com,993,smtp.office365.com,587 +hs-mittweida.de,mail.hs-mittweida.de,993,mail.hs-mittweida.de,465 -- cgit v1.2.3 From 4904fcf51f878a8648d333d2fac7cbfe2728c47b Mon Sep 17 00:00:00 2001 From: Kipras Melnikovas Date: Sun, 24 Nov 2019 01:31:17 +0200 Subject: Fix script removal (#310) The `script` variable you were referring to previously is actually the relative path to a script, for example `bin/mw`. This fails to remove the script, because, obviously, the path is incorrect. I'd suggest renaming `script` to `scriptPath` in line 13 and `shared` to `sharedPath` in line 18 (or whatever variable names you prefer that make it clearer) to avoid confusion in the future. Signed-off-by: Kipras Melnikovas --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 20c82d1..823e719 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,9 @@ install: cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1 uninstall: - for script in bin/*; do \ - rm -f $(DESTDIR)$(PREFIX)/bin/$$script; \ + for scriptPath in bin/*; do \ + scriptFile=$$(basename $$scriptPath); \ + rm -f $(DESTDIR)$(PREFIX)/bin/$$scriptFile; \ done rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1 -- cgit v1.2.3 From eb767737d49b48c9e29134cf68a022780d7991fb Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 23 Nov 2019 18:39:16 -0500 Subject: space to tag, tags highlighted --- share/mutt-wizard.muttrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc index e006e3f..994fcb7 100644 --- a/share/mutt-wizard.muttrc +++ b/share/mutt-wizard.muttrc @@ -44,6 +44,7 @@ bind index U undelete-message bind index L limit bind index h noop bind index l display-message +bind index tag-entry #bind browser h goto-parent macro browser h '..' "Go to parent folder" bind index,pager H view-raw-message @@ -91,6 +92,11 @@ color index brightyellow black "~N" color index_author brightred black "~N" color index_subject brightcyan black "~N" +# Tagged mail is highlighted: +color index brightyellow blue "~T" +color index_author brightred blue "~T" +color index_subject brightcyan blue "~T" + # Other colors and aesthetic settings: mono bold bold mono underline underline -- cgit v1.2.3 From 6aa28a56b1d9b027a48feb26dc4c45bc829e5d65 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 23 Nov 2019 19:23:27 -0500 Subject: STATUSBAR matching LARBS changes --- bin/mailsync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/mailsync b/bin/mailsync index c56ccb2..212a97c 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -48,7 +48,7 @@ else fi echo " 🔃" > /tmp/imapsyncicon_"$USER" -pkill -RTMIN+12 i3blocks >/dev/null 2>&1 +pkill -RTMIN+12 "$STATUSBAR" >/dev/null 2>&1 # Parallelize multiple accounts for account in $accounts @@ -58,7 +58,7 @@ done wait rm -f /tmp/imapsyncicon_"$USER" -pkill -RTMIN+12 i3blocks >/dev/null 2>&1 +pkill -RTMIN+12 "$STATUSBAR" >/dev/null 2>&1 notmuch new 2>/dev/null -- cgit v1.2.3 From 3fee819bfe39449687fa1ad038e9df914c7247da Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 24 Nov 2019 07:42:08 -0500 Subject: fix if STATUSBAR not set --- bin/mailsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mailsync b/bin/mailsync index 212a97c..f0b62ea 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -48,7 +48,7 @@ else fi echo " 🔃" > /tmp/imapsyncicon_"$USER" -pkill -RTMIN+12 "$STATUSBAR" >/dev/null 2>&1 +pkill -RTMIN+12 "${STATUSBAR:?}" >/dev/null 2>&1 # Parallelize multiple accounts for account in $accounts -- cgit v1.2.3 From 7698abb0f9fc236b578e3ec6caa31867de019c6e Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 24 Nov 2019 07:44:23 -0500 Subject: lol fix other --- bin/mailsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mailsync b/bin/mailsync index f0b62ea..f7c3211 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -58,7 +58,7 @@ done wait rm -f /tmp/imapsyncicon_"$USER" -pkill -RTMIN+12 "$STATUSBAR" >/dev/null 2>&1 +pkill -RTMIN+12 "${STATUSBAR:?}" >/dev/null 2>&1 notmuch new 2>/dev/null -- cgit v1.2.3 From 938af8f7ebe8b769f0916ebdb19b146d0463409a Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 24 Nov 2019 07:48:33 -0500 Subject: env bash --- bin/muttimage | 4 ++-- bin/mw | 2 +- bin/openfile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/muttimage b/bin/muttimage index c798293..a846bea 100755 --- a/bin/muttimage +++ b/bin/muttimage @@ -1,9 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash #get image resolution resolution=$(identify $1 | awk '{print $3}') IFS='x' # x is set as delimiter -read -ra ADDR <<< "$resolution" +read -ra ADDR <<< "$resolution" width=${ADDR[0]} height=${ADDR[1]} diff --git a/bin/mw b/bin/mw index 5e03606..99c640e 100755 --- a/bin/mw +++ b/bin/mw @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2" [ -z ${PASSWORD_STORE_DIR+x} ] && PASSWORD_STORE_DIR="$HOME/.password-store" [ -r "$PASSWORD_STORE_DIR/.gpg-id" ] && diff --git a/bin/openfile b/bin/openfile index e530b3e..b16483b 100755 --- a/bin/openfile +++ b/bin/openfile @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Helps open a file with xdg-open from mutt in a external program without weird side effects. [ $(uname) = "Darwin" ] && opener="open" || opener="setsid xdg-open" mkdir -p "/tmp/$USER-mutt-tmp" -- cgit v1.2.3 From 02b8e2a58c603b841c747b71a7a2b6c1e70c7912 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 24 Nov 2019 07:48:43 -0500 Subject: don't expire unread explicit --- bin/mw | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/mw b/bin/mw index 99c640e..ea00271 100755 --- a/bin/mw +++ b/bin/mw @@ -73,6 +73,7 @@ Patterns * !\"[Gmail]/All Mail\" Create Both SyncState * MaxMessages $maxmes +ExpireUnread no # End profile " -- cgit v1.2.3 From 15941b43e7cec4b66ad2e9911ca791f365aac362 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 24 Nov 2019 08:26:16 -0500 Subject: Revert "Fix script removal (#310)" This reverts commit 4904fcf51f878a8648d333d2fac7cbfe2728c47b. --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 823e719..20c82d1 100644 --- a/Makefile +++ b/Makefile @@ -26,9 +26,8 @@ install: cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1 uninstall: - for scriptPath in bin/*; do \ - scriptFile=$$(basename $$scriptPath); \ - rm -f $(DESTDIR)$(PREFIX)/bin/$$scriptFile; \ + for script in bin/*; do \ + rm -f $(DESTDIR)$(PREFIX)/bin/$$script; \ done rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1 -- cgit v1.2.3 From 576d7b3d65d10e13418f1c05b504065207208f41 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 25 Nov 2019 12:40:18 -0500 Subject: backup files deleted on install --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 13214f5..d66ca46 100644 --- a/Makefile +++ b/Makefile @@ -20,11 +20,11 @@ install: 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; \ + rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \ sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/bin/mw; \ + rm -f $(DESTDIR)$(PREFIX)/bin/mwba; \ 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; \ + rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1ba; \ fi uninstall: -- cgit v1.2.3 From ea1526dbd2e901aed18be123755a4e790023b2d0 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 25 Nov 2019 16:50:08 -0500 Subject: ensure permissions --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index d66ca46..00e71e8 100644 --- a/Makefile +++ b/Makefile @@ -13,11 +13,14 @@ install: chmod 755 $(DESTDIR)$(PREFIX)/$$script; \ done mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard + chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard for shared in share/*; do \ cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \ + chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$shared; \ done mkdir -p $(DESTDIR)$(MANPREFIX)/man1 cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1 + chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mw.1 if [ "$(PREFIX)" ]; then \ sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \ rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \ -- cgit v1.2.3 From c19d305c4f9681568b79e52c43532def4356df71 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 25 Nov 2019 18:30:24 -0500 Subject: share files permission fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 00e71e8..6633b7b 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ install: chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard for shared in share/*; do \ cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \ - chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$shared; \ + chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$(basename $(notdir $$shared)); \ done mkdir -p $(DESTDIR)$(MANPREFIX)/man1 cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1 -- cgit v1.2.3 From dfdc3162bafa4abebcb91106085aaf4f575db57d Mon Sep 17 00:00:00 2001 From: Ole Martin Ruud Date: Wed, 27 Nov 2019 14:16:37 +0100 Subject: Add app name to notify-send invocation (#324) This enables users to easily recognize notifications to be able to modify or style them through notification daemons. --- bin/mailsync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/mailsync b/bin/mailsync index f7c3211..2cec271 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -20,7 +20,7 @@ command -v notify-send >/dev/null || echo "Note that \`libnotify\` or \`libnotif if [ "$(uname)" = "Darwin" ]; then notify() { osascript -e "display notification \"$2 in $1\" with title \"You've got Mail\" subtitle \"Account: $account\"" && sleep 2 ;} else - notify() { notify-send "mutt-wizard" "📬 $2 new mail(s) in \`$1\` account." ;} + notify() { notify-send --app-name="mutt-wizard" "mutt-wizard" "📬 $2 new mail(s) in \`$1\` account." ;} fi # Check account for new mail. Notify if there is new content. @@ -35,7 +35,7 @@ syncandnotify() { # Extract subject and sender from mail. from=$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//') subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n-1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n') - notify-send "📧$from:" "$subject" & + notify-send --app-name="mutt-wizard" "📧$from:" "$subject" & done fi } -- cgit v1.2.3 From 569bda9c5fddf131a962237422326de9929c6b77 Mon Sep 17 00:00:00 2001 From: Mellowlink <57295219+Mellowlinku@users.noreply.github.com> Date: Wed, 27 Nov 2019 14:17:19 +0100 Subject: Pinentry-tty and curses support (#317) I did edit the line 65 and added directly "mbsync -a" instead of "mailsync...". In current state mutt-wizard doesn't work properly in CLI only environment without X started. This is first step to be able atleast mbsync with terminal only pinentry. The problem still remains in sending an email with terminal only pinentry. Temporary solution for is to activate gpg key before sending an email and send the email before the key times out. --- share/mutt-wizard.muttrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc index b74f244..2c96b19 100644 --- a/share/mutt-wizard.muttrc +++ b/share/mutt-wizard.muttrc @@ -63,7 +63,7 @@ bind editor complete-query macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" macro index \Cr "T~UN." "mark all messages as read" -macro index O "mailsync -Va" "run mbsync to sync all mail" +macro index O "mbsync -a" "run mbsync to sync all mail" macro index \Cf "unset wait_keyread -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"" "show only messages matching a notmuch pattern" macro index A "all\n" "show all messages (undo limit)" -- cgit v1.2.3