feat(omo): notify this Mac about omo sessions on flowstate-remote

mosh drops the OSC 777 banner that omo-notify posts, so omo sessions on the server only reached the phone through ntfy. The server's omo-notify now writes the session state into its tmux client's terminal title (omo:<state>:<time>:<project>), which mosh and ssh carry. A pane-title-changed hook hands it to the new omo-remote, which runs omo-notify for the local mosh pane through the new OMO_NOTIFY_PANE override, so remote sessions get the same sound, tab marker and banner as local ones.

Sessions that no terminal is showing come through ntfy instead: omo-remote install starts a launchd agent running ntfy subscribe, which plays the sound and posts the banner for omo pushes the server did not tag attached. Brewfile gains ntfy; the token lives in ~/.config/ntfy/omo-remote.env, outside the repository.
This commit is contained in:
David Ibia
2026-10-17 16:09:35 +01:00
parent 46e7c8e04b
commit c9059d4867
5 changed files with 148 additions and 1 deletions
+3 -1
View File
@@ -56,7 +56,9 @@ esac
# Find the tmux pane omo runs in: hooks run detached without TMUX_PANE, so walk
# up the process tree to the first ancestor whose tty is a tmux pane.
# Outside tmux, the first tty found is the Ghostty tab's own terminal.
pane=""
# omo-remote names the pane itself (OMO_NOTIFY_PANE): for a session on a remote
# server it is the local pane running mosh or ssh.
pane="${OMO_NOTIFY_PANE:-}"
own_tty=""
panes=$(tmux list-panes -a -F '#{pane_tty} #{pane_id}' 2>/dev/null)
pid=$PPID