Browse Source

Added automation for msmtpq outbox along with statusbar icon for outbox

balena
Micah Halter 7 months ago
parent
commit
022da9d3af
Signed by: mehalter GPG Key ID: 4224A6EA9A8CAAA8
7 changed files with 31 additions and 4 deletions
  1. +1
    -1
      isync/.config/systemd/user/mbsync.service
  2. +6
    -0
      msmtp/.config/systemd/user/msmtpq.service
  3. +10
    -0
      msmtp/.config/systemd/user/msmtpq.timer
  4. +2
    -2
      mutt/.config/mutt/muttrc
  5. +1
    -1
      scripts/.local/bin/msmtpq
  6. +1
    -0
      scripts/.local/bin/statusbar/fullbar
  7. +10
    -0
      scripts/.local/bin/statusbar/outbox

+ 1
- 1
isync/.config/systemd/user/mbsync.service View File

@ -6,4 +6,4 @@ Type=oneshot
ExecStart=/usr/bin/mbsync -c /home/micah/.config/isync/mbsyncrc -Va
ExecStartPre=/bin/sh -c 'echo "" > /tmp/mailsync'
ExecStartPost=/usr/bin/notmuch new
ExecStopPost=/bin/sh -c 'if [ "$$EXIT_STATUS" = 0 ]; then rm /tmp/mailsync; else echo "" > /tmp/mailsync; fi && notifymail'
ExecStopPost=/bin/sh -c 'if [ "$$EXIT_STATUS" = 0 ]; then rm /tmp/mailsync; else echo "" > /tmp/mailsync; fi && notifymail'

+ 6
- 0
msmtp/.config/systemd/user/msmtpq.service View File

@ -0,0 +1,6 @@
[Unit]
Description=msmtpq synchronization service
[Service]
Type=oneshot
ExecStart=/home/micah/.local/bin/msmtpq --q-mgmt -r

+ 10
- 0
msmtp/.config/systemd/user/msmtpq.timer View File

@ -0,0 +1,10 @@
[Unit]
Description=msmtpq synchronization timer
[Timer]
OnBootSec=2m
OnUnitInactiveSec=1m
Unit=msmtpq.service
[Install]
WantedBy=timers.target

+ 2
- 2
mutt/.config/mutt/muttrc View File

@ -102,8 +102,8 @@ set forward_format = "Fwd: %s"
set forward_quote
# Threads
set sort = reverse-threads
set sort_aux = date-received
set sort = threads
set sort_aux = reverse-last-date-received
set sort_browser = reverse-date
set uncollapse_jump
set sort_re


+ 1
- 1
scripts/.local/bin/msmtpq View File

@ -70,7 +70,7 @@ MSMTP=msmtp
## ( chmod 0700 msmtp.queue )
##
## the queue dir - modify this to reflect where you'd like it to be (no quotes !!)
Q=$XDG_CONFIG_HOME/msmtp/queue
Q=$XDG_DATA_HOME/msmtp/queue
[ -d "$Q" ] || \
err '' "msmtpq : can't find msmtp queue directory [ $Q ]" '' # if not present - complain ; quit
##


+ 1
- 0
scripts/.local/bin/statusbar/fullbar View File

@ -3,6 +3,7 @@
scripts="$HOME/.local/bin/statusbar"
{ "$scripts"/mail;
"$scripts"/outbox;
"$scripts"/volume;
"$scripts"/network;
"$scripts"/powersaver;


+ 10
- 0
scripts/.local/bin/statusbar/outbox View File

@ -0,0 +1,10 @@
#!/bin/env sh
OUTBOXHOME="$XDG_DATA_HOME/msmtp/queue"
if [ -d "$OUTBOXHOME" ]; then
out=$(msmtpq --q-mgmt -d | grep num | wc -l)
if [ "$out" != "0" ]; then
echo " $out"
fi
fi

Loading…
Cancel
Save