[neomutt-users] run script in background?

Kenneth Flak kennethflak at protonmail.com
Tue Aug 16 14:08:01 CEST 2022


Great, thanks! Didn't know about that particular hook.

K

--
Roosna & Flak - Contemporary Dance & Music
Web: roosnaflak.com
Code: {github,gitlab}.com/kflak
Mastodon: @kf at sonomu.club
On 16 Aug 2022  11:55, Pietro Cerutti wrote:
>On Aug 16 2022, 11:46 UTC, Kenneth Flak <kennethflak at protonmail.com> wrote:
>>Hi Pietro,
>>
>>Sure, that would definitely be an option (I'm just too impatient to
>>wait for the job to be launched, haha)... I guess that is indeed the
>>better version. But I am still curious if something like running async
>>jobs would be possible in neomutt.
>
>You could use a timeout-hook to run an external shell command every
>$timeout seconds:
>
>timeout-hook "echo `mail-sync.sh`"
>
>See https://neomutt.org/feature/global-hooks
>
>
>>
>>K
>>
>>--
>>Roosna & Flak - Contemporary Dance & Music
>>Web: roosnaflak.com
>>Code: {github,gitlab}.com/kflak
>>Mastodon: @kf at sonomu.club
>>On 16 Aug 2022  11:40, Pietro Cerutti wrote:
>>>On Aug 16 2022, 11:25 UTC, Kenneth Flak <kennethflak at protonmail.com> wrote:
>>>>Hi list,
>>>>
>>>>I am using the good old combination of mbsync, notmuch and neomutt,
>>>>with the notable addition of goimapnotify doing some automated pulling
>>>>for me. However, I would like to be able to trigger my mail-sync script
>>>>from neomutt _without_ having to break out of the index window and be
>>>>dropped to a shell while the update is happening. Is there any way to
>>>>do this:
>>>>
>>>>macro index,pager <tab> "<sync-mailbox><shell-escape>mail-sync.sh<enter>"
>>>>
>>>>as a background job? I naively tried stuffing an & after mail-sync.sh,
>>>>but that just mangles my terminal window...
>>>
>>>Would it work to configure mail-sync.sh through cron and let NeoMutt
>>>periodically sync with your local mailbox independently?
>>>
>>>--
>>>Pietro Cerutti
>>
>
>--
>Pietro Cerutti



More information about the neomutt-users mailing list