~anjan/public-inbox

Modified script for tool versatility v1 APPLIED

Bosco Vallejo-Nágera <bosco@vallejonagera.xyz>
Bosco Vallejo-Nágera: 1
 Modified script for tool versatility

 1 files changed, 8 insertions(+), 8 deletions(-)
No worries, thank you and merged!

To git.sr.ht:~anjan/sxmo-userscripts
   73a654a..e9e18ff  master -> master

--
w:] www.momi.ca
pgp:] https://momi.ca/publickey.txt
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~anjan/public-inbox/patches/32882/mbox | git am -3
Learn more about email & git

[PATCH] Modified script for tool versatility Export this patch

Bosco Vallejo-Nágera <bosco@vallejonagera.xyz>
---
 scripts/mail.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/scripts/mail.sh b/scripts/mail.sh
index 33e7870..c9be4c1 100755
--- a/scripts/mail.sh
+++ b/scripts/mail.sh
@@ -3,7 +3,7 @@
# minimal email client.
# script requires mbsync (isync) and mu
# mbsync is required to send email
# If you have alot of email use 
# If you have alot of email use
# format of MAILDIR should be $MAILDIR/ACCOUNT/{INBOX,Archive,etc.}/{cur,new,tmp}


@@ -38,7 +38,7 @@ finddir() {
}

prompt() {
	dmenu -i -fn Terminus-20 -c -l 15 "$@"
    sxmo_dmenu.sh -i "$@"
}

attachmenthandler() {
@@ -54,7 +54,7 @@ attachmenthandler() {
			zathura "$tmp"
			;;
		"text/html")
			firefox "$tmp" 
			firefox "$tmp"
			;;
	esac
	rm "$tmp"
@@ -66,9 +66,9 @@ showmsg() {

	if [ $incontext = 1 ]
	then
		st -e mless .
		sxmo_terminal.sh mless .
	else
		st -e mless
		sxmo_terminal.sh mless
	fi

	while : ;
@@ -96,7 +96,7 @@ showmsg() {
				ACCOUNT="$(findaccount .)"
				ARCHIVEDIR="$(finddir "$ACCOUNT" "archive")"
				mrefile -v . "$MAILDIR/$ACCOUNT/$ARCHIVEDIR" || echo "error occured" | prompt
				st -e mless .+1
				sxmo_terminal.sh mless .+1
				;;
			*)
				break ;;
@@ -116,7 +116,7 @@ mainmenu() {
				account="$(ls -1 "$MAILDIR" | prompt)"
				;;
			"Get Mail")
				st -e mbsync -a -c "$MBSYNC_CONFIG"
				sxmo_terminal.sh mbsync -a -c "$MBSYNC_CONFIG"
				;;
			"Show Inbox")
				#mlist "$MAILDIR"/"$account"/"$(finddir "$account" "inbox")" | mthread -r | mseq -S
@@ -136,7 +136,7 @@ mainmenu() {
}

# todo, move to startup script and check if set by user
export MAILDIR=~/.mail
export MAILDIR=~/.local/share/mail
export MBSYNC_CONFIG=~/.config/isync/mbsyncrc
export MBLAZE="$XDG_CONFIG_HOME/mblaze"
export MBLAZE_PAGER="less -R"
-- 
2.32.0 (Apple Git-132)
Bosco Vallejo-Nágera <bosco@vallejonagera.xyz>
Apologies for not specifying the repo it's patching, I'm new to
git-send-mail and thought it did it automatically.
It's just a minor change I had to do to get this working in the wayland
version of sxmo, by using sxmo_terminal and sxmo_dmenu instead of having
dmenu and st hard coded.