diff options
| author | Ivan K. Boikov <mail@ikboikov.net> | 2024-12-22 18:35:54 +0100 |
|---|---|---|
| committer | Ivan K. Boikov <mail@ikboikov.net> | 2024-12-22 18:35:54 +0100 |
| commit | 691341083fb43e9824bcc2970e5b2c0beac7b9bf (patch) | |
| tree | 90d5e9913a6fc039b10a6e925f166e517ac59466 /scripts | |
| parent | 57806f3b7a751f07e478a8e756f5f74149dd7dd1 (diff) | |
Reliable launch of many mutts
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/.local/bin/mailclient | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/scripts/.local/bin/mailclient b/scripts/.local/bin/mailclient index 981485f..bc31aac 100755 --- a/scripts/.local/bin/mailclient +++ b/scripts/.local/bin/mailclient @@ -1,7 +1,18 @@ -#!/bin/sh +#!/bin/bash + +# for some reason, for reliable performance, I have to first start an empty terminal +# could be a dwm issue +$TERMINAL & +P1=$! +disown +sleep 0.03 for file in "$XDG_CONFIG_HOME/mutt/accounts"/*; do - title="mutt: $(grep "set my_email" "$file" | cut -d'=' -f2 | xargs)" - "$TERMINAL" -T "$title" mutt -F "$file" & - sleep 0.1 + title="mutt: $(grep "set my_email" "$file" | cut -d'=' -f2 | xargs)" + "$TERMINAL" -T "$title" mutt -F "$file" & + disown done + +wait +sleep 0.03 +kill "$P1" |
