From 9254d170236eeb9d9e113915c89ec4cab34a5f98 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Thu, 24 Sep 2026 04:40:56 +0530 Subject: feat(communication/neomutt): added auto syncing daemon that runs with the client --- modules/communication/neomutt/neomutt-launcher.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 modules/communication/neomutt/neomutt-launcher.sh (limited to 'modules/communication/neomutt/neomutt-launcher.sh') diff --git a/modules/communication/neomutt/neomutt-launcher.sh b/modules/communication/neomutt/neomutt-launcher.sh new file mode 100644 index 0000000..d677680 --- /dev/null +++ b/modules/communication/neomutt/neomutt-launcher.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Wrapped neomutt: keeps the neomutt-sync systemd daemon alive for the +# lifetime of a neomutt session. +set -uo pipefail +SYSTEMCTL='@@SYSTEMCTL@@' +PGREP='@@PGREP@@' +NEOMUTT='@@NEOMUTT@@' + +"$SYSTEMCTL" --user start neomutt-sync.service || true +stop_service() { + "$PGREP" -x neomutt >/dev/null || "$SYSTEMCTL" --user stop neomutt-sync.service || true +} +trap stop_service EXIT + +export PATH="@@PROFILE_BIN@@:@@URLSCAN_BIN@@:$PATH" +"$NEOMUTT" "$@" -- cgit v1.2.3