Skip to content

Fix Niri focus detection with tmux - #173

Open
pernilsalat wants to merge 1 commit into
franciscolourenco:masterfrom
pernilsalat:fix/niri-tmux-focus
Open

Fix Niri focus detection with tmux#173
pernilsalat wants to merge 1 commit into
franciscolourenco:masterfrom
pernilsalat:fix/niri-tmux-focus

Conversation

@pernilsalat

Copy link
Copy Markdown

Fix Niri focus detection with tmux

Fixes #170

This changes focus detection so that Niri and tmux focus state are considered together.

Previously, when the Niri window containing tmux remained focused, the Niri-specific branch returned before tmux focus detection could determine whether the original tmux window was still active.

The Niri check now returns early only when the Niri window is no longer focused. Otherwise, focus detection continues to the tmux check.

The tmux check also includes pane_active, allowing done to distinguish between panes within the same tmux window.

Tested manually with:

  • same Niri window and same tmux pane: no notification
  • same Niri window and different tmux pane: notification
  • same Niri window and different tmux window: notification
  • different Niri window: notification
  • outside tmux, same Niri window: no notification
  • outside tmux, different Niri window: notification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Niri focus detection prevents tmux window/pane detection

1 participant