run notmuch with runit
This commit is contained in:
parent
7887de9492
commit
19c48412cc
@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
from alot.commands.globals import ExternalCommand
|
|
||||||
|
|
||||||
def loop_hook(ui=None):
|
|
||||||
ui.apply_command(ExternalCommand(
|
|
||||||
["notmuch", "new", "--quiet"],
|
|
||||||
thread=True,
|
|
||||||
))
|
|
||||||
if ui and ui.current_buffer:
|
|
||||||
ui.update()
|
|
||||||
|
|
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…
Reference in New Issue
Block a user