run notmuch with runit
This commit is contained in:
parent
7887de9492
commit
19c48412cc
3 changed files with 20 additions and 11 deletions
15
services/notmuch/notmuch
Executable file
15
services/notmuch/notmuch
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# check for internet connection
|
||||
ip route ls | grep -v '' && exit 1
|
||||
|
||||
# check if the gpg-agent is running
|
||||
if ! pgrep gpg-agent >/dev/null; then
|
||||
notify-send "no gpg-agent"
|
||||
sleep 10
|
||||
exit 2
|
||||
fi
|
||||
|
||||
while notmuch --config="$HOME/.notmuch-config" new --quiet 2>&1 | grep -v "Ignoring" | xargs -0 --no-run-if-empty notify-send && sleep 3m; do
|
||||
true
|
||||
done
|
5
services/notmuch/run
Executable file
5
services/notmuch/run
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
exec env \
|
||||
HOME="${HOME:-/home/noctua}" \
|
||||
DISPLAY="${DISPLAY:-:0}" \
|
||||
./notmuch
|
Loading…
Add table
Add a link
Reference in a new issue