diff options
Diffstat (limited to 'dot_config/sway/executable_tb-autostart.sh')
| -rw-r--r-- | dot_config/sway/executable_tb-autostart.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dot_config/sway/executable_tb-autostart.sh b/dot_config/sway/executable_tb-autostart.sh index f841428..c711e7f 100644 --- a/dot_config/sway/executable_tb-autostart.sh +++ b/dot_config/sway/executable_tb-autostart.sh @@ -7,6 +7,17 @@ set -eu MARK=tb-main +BRIDGE_PORT=1143 + +# Wait for protonmail-bridge's IMAP listener before launching Thunderbird so +# TB doesn't pop up a "failed to login to 127.0.0.1" error on cold boot. Give +# up after ~15s and launch anyway — the user can reconnect manually. +for _ in $(seq 1 150); do + if ss -ltnH "sport = :$BRIDGE_PORT" 2>/dev/null | grep -q .; then + break + fi + sleep 0.1 +done thunderbird & |
