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 --- bin/mw | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'bin/mw') 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 -- 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(-) (limited to 'bin/mw') 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 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(-) (limited to 'bin/mw') 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(+) (limited to 'bin/mw') 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