diff options
| author | 2026-07-02 11:35:35 +0100 | |
|---|---|---|
| committer | 2026-07-02 11:35:35 +0100 | |
| commit | 9c34010e1dce016d1b31d651dbcd332e747844e7 (patch) | |
| tree | 1eedb7c98a2493e097b5a3eb1dff296527f51e20 /dot_config/sway/executable_tb-autostart.sh | |
| parent | f0c626059451e1f8621600e610240739d5633560 (diff) | |
| download | dotfiles-9c34010e1dce016d1b31d651dbcd332e747844e7.tar.gz dotfiles-9c34010e1dce016d1b31d651dbcd332e747844e7.tar.bz2 dotfiles-9c34010e1dce016d1b31d651dbcd332e747844e7.zip | |
Update Proton Bridge desktop integration
Diffstat (limited to 'dot_config/sway/executable_tb-autostart.sh')
| -rw-r--r-- | dot_config/sway/executable_tb-autostart.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dot_config/sway/executable_tb-autostart.sh b/dot_config/sway/executable_tb-autostart.sh index 3a85dc5..b7b9b78 100644 --- a/dot_config/sway/executable_tb-autostart.sh +++ b/dot_config/sway/executable_tb-autostart.sh @@ -8,22 +8,26 @@ set -eu MARK=tb-main BRIDGE_HOST=127.0.0.1 -BRIDGE_PORT=1143 +BRIDGE_IMAP_PORT=1144 +BRIDGE_SMTP_PORT=1016 # protonmail-bridge opens the IMAP socket early (before the keyring is # unlocked), so "port is listening" is not enough — TB will race and pop up # "failed to login to 127.0.0.1". Wait for the real IMAP '* OK' greeting, # which the bridge only sends once it can actually service logins. for _ in $(seq 1 300); do - banner=$(ncat -w 1 -i 1 "$BRIDGE_HOST" "$BRIDGE_PORT" </dev/null 2>/dev/null | head -c 64) + banner=$(ncat -w 1 -i 1 "$BRIDGE_HOST" "$BRIDGE_IMAP_PORT" </dev/null 2>/dev/null | head -c 64) case "$banner" in "* OK"*) break ;; esac sleep 0.2 done -# Small grace period so the SMTP listener (1025) catches up too. -sleep 10 +# SMTP tends to come up after IMAP; wait briefly so TB sees both local servers. +for _ in $(seq 1 50); do + ncat -z -w 1 "$BRIDGE_HOST" "$BRIDGE_SMTP_PORT" 2>/dev/null && break + sleep 0.2 +done flatpak run org.mozilla.thunderbird & |
