Description
suppressWhenFocused does not suppress notifications in tmux when the tmux session has multiple attached clients.
Environment
- Plugin:
@mohak34/opencode-notifier@0.2.3
- Platform: Linux X11
- tmux in use
suppressWhenFocused: true
Observed behavior
Even when the OpenCode terminal/pane is focused, notifications are still sent.
What I found
The focus check parses:
tmux display-message -p '#{session_attached} #{window_active} #{pane_active}'
On my setup it returns:
Current logic treats focus as true only when:
- session_attached === "1"
- window_active === "1"
- pane_active === "1"
So 2 1 1 is incorrectly treated as not focused.
Why this is wrong
session_attached in tmux is a count of attached clients, not a boolean:
- 0 = detached
- 1+ = attached
So 2 should still be considered attached/valid for focus suppression.
Expected behavior
suppressWhenFocused should suppress notifications when:
- session_attached > 0
- window_active === 1
- pane_active === 1
Description
suppressWhenFocuseddoes not suppress notifications in tmux when the tmux session has multiple attached clients.Environment
@mohak34/opencode-notifier@0.2.3suppressWhenFocused: trueObserved behavior
Even when the OpenCode terminal/pane is focused, notifications are still sent.
What I found
The focus check parses:
tmux display-message -p '#{session_attached} #{window_active} #{pane_active}'On my setup it returns:
Current logic treats focus as true only when:
So 2 1 1 is incorrectly treated as not focused.
Why this is wrong
session_attached in tmux is a count of attached clients, not a boolean:
So 2 should still be considered attached/valid for focus suppression.
Expected behavior
suppressWhenFocused should suppress notifications when: