-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Issue description
I am trying to use hterm-notify.sh to deliver notifications from a remote. It uses escape sequences to print a command to the local terminal, which interprets it to display a notification. My specific use case is to send a notification when a long-running command, most likely running on a different tmux pane/window, completes.
printf '\033Ptmux;\033\033]777;notify;title;body\a\033\\'
This works from outside and within tmux, if printed from the active window. However, if printed from a pane on another window, it will not trigger a notification.
The full stack is: Secure Shell App on ChromeOS -> Remote over SSH (Arch Linux, xterm-256color) -> tmux.
Steps to replicate
- SSH to remote.
- Start a tmux session.
- Run
printf '\033Ptmux;\033\033]777;notify;title;body\a\033\\'
. Observe notification works. - Run
sleep 3 && printf '\033Ptmux;\033\033]777;notify;title;body\a\033\\'
- Create and switch to a different window within 3 seconds.
- After >3s, observe no notification.
tmux-server-370910.log
tmux-out-370910.log
I'm not sure how to confirm delivery of an escape sequence that doesn't involve a notification, but if you have instructions I'd be happy to try it.
I suspect that it may not be possible to send escape sequences to the outside terminal from within an unfocused tmux pane, but I thought it would be worth confirming.
Required information
- tmux version: tmux 3.0a
- Platform: Linux unknown
- $TERM inside and outside of tmux
- outside: xterm-256color
- inside: screen-256color
- Logs from tmux: generated from
-Ltest -f/dev/null -vv new