diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 04:40:56 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 04:40:56 +0530 |
| commit | 9254d170236eeb9d9e113915c89ec4cab34a5f98 (patch) | |
| tree | 3abd9baca5b20db9903b1d652e1f3c0c7a3157a7 /modules/communication/neomutt/neomutt-launcher.sh | |
| parent | 3a6e45ad18c519b21c9cadb2d374148647886b05 (diff) | |
| download | home-manager-config-9254d170236eeb9d9e113915c89ec4cab34a5f98.tar.gz home-manager-config-9254d170236eeb9d9e113915c89ec4cab34a5f98.zip | |
feat(communication/neomutt): added auto syncing daemon that runs with the client
Diffstat (limited to 'modules/communication/neomutt/neomutt-launcher.sh')
| -rw-r--r-- | modules/communication/neomutt/neomutt-launcher.sh | 16 |
1 files changed, 16 insertions, 0 deletions
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" "$@" |
