summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-02-21 10:14:17 -0500
committerLuke Smith <luke@lukesmith.xyz>2019-02-21 10:14:17 -0500
commit03279ea318805b3fa7545f01385485e8053daea5 (patch)
treeb015842b634f78d2f0f3a275ef561a75c153dab8 /etc
parentf2dcd92c30d4d595a3daa4f8e977ffb967839b69 (diff)
rewrite underway
Diffstat (limited to 'etc')
-rw-r--r--etc/email.gifbin7545 -> 0 bytes
-rw-r--r--etc/mailcap7
-rwxr-xr-xetc/mailsync.sh43
-rwxr-xr-xetc/muttimage.sh8
-rw-r--r--etc/mw.pngbin24980 -> 0 bytes
-rw-r--r--etc/notify.opusbin28900 -> 0 bytes
-rwxr-xr-xetc/openfile.sh14
7 files changed, 0 insertions, 72 deletions
diff --git a/etc/email.gif b/etc/email.gif
deleted file mode 100644
index 1ed63cf..0000000
--- a/etc/email.gif
+++ /dev/null
Binary files differ
diff --git a/etc/mailcap b/etc/mailcap
deleted file mode 100644
index 503a75a..0000000
--- a/etc/mailcap
+++ /dev/null
@@ -1,7 +0,0 @@
-text/plain; vim %s ;
-text/html; ~/.config/mutt/etc/openfile.sh %s ;
-text/html; w3m -I %{charset} -T text/html; copiousoutput;
-image/*; ~/.config/mutt/etc/muttimage.sh %s ; copiousoutput
-video/*; setsid mpv --quiet %s &; copiousoutput
-application/pdf; ~/.config/mutt/etc/openfile.sh %s ;
-application/pgp-encrypted; gpg -d '%s'; copiousoutput;
diff --git a/etc/mailsync.sh b/etc/mailsync.sh
deleted file mode 100755
index 6068464..0000000
--- a/etc/mailsync.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env sh
-# This script will run offlineimap and check
-# for new email if there is an internet connection.
-#
-# If it detects new mail, it uses mpv to play a
-# notification sound: notify.opus
-#
-# I have this run as a cronjob every 5 minutes.
-
-export DISPLAY=:0.0
-
-# Checks for internet connection and set notification script.
-ping -q -c 1 1.1.1.1 > /dev/null || exit
-# Settings are different for MacOS (Darwin) systems.
-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() { mpv --really-quiet ~/.config/mutt/etc/notify.opus & pgrep -x dunst && notify-send -i ~/.config/mutt/etc/email.gif "$2 new mail(s) in \`$1\` account." ;}
-fi
-
-echo " 🔃" > /tmp/imapsyncicon
-pkill -RTMIN+12 i3blocks
-
-# Run offlineimap. You can feed this script different settings.
-offlineimap -o "$@"
-rm -f /tmp/imapsyncicon
-pkill -RTMIN+12 i3blocks
-
-# Check all accounts/mailboxes for new mail. Notify if there is new content.
-for account in $(ls ~/.mail)
-do
- #List unread messages newer than last mailsync and count them
- newcount=$(find ~/.mail/"$account"/INBOX/new/ -type f -newer ~/.config/mutt/etc/.mailsynclastrun 2> /dev/null | wc -l)
- if [ "$newcount" -gt "0" ]
- then
- notify "$account" "$newcount" &
- fi
-done
-notmuch new
-
-#Create a touch file that indicates the time of the last run of mailsync
-touch ~/.config/mutt/etc/.mailsynclastrun
diff --git a/etc/muttimage.sh b/etc/muttimage.sh
deleted file mode 100755
index b67de83..0000000
--- a/etc/muttimage.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/sh
-
-#### Determine size of Terminal
-height=`stty size | awk 'BEGIN {FS = " "} {print $1;}'`
-width=`stty size | awk 'BEGIN {FS = " "} {print $2;}'`
-
-### Display Image / offset with mutt bar
-echo -e "2;3;\n0;1;210;20;$((width*7-250));$((height*14-100));0;0;0;0;$1\n4;\n3;" | /usr/lib/w3m/w3mimgdisplay &
diff --git a/etc/mw.png b/etc/mw.png
deleted file mode 100644
index dd15ce8..0000000
--- a/etc/mw.png
+++ /dev/null
Binary files differ
diff --git a/etc/notify.opus b/etc/notify.opus
deleted file mode 100644
index a76ce32..0000000
--- a/etc/notify.opus
+++ /dev/null
Binary files differ
diff --git a/etc/openfile.sh b/etc/openfile.sh
deleted file mode 100755
index c866932..0000000
--- a/etc/openfile.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-# Helps open a file with xdg-open from mutt in a external program without weird side effects.
-
-base=$(basename "$1")
-ext="${base##*.}"
-
-file=$(mktemp -u --suffix=".$ext")
-
-rm -f "$file"
-
-cp "$1" "$file"
-
-setsid xdg-open "$file" >/dev/null 2>&1 &