pi-tmux-cursor-focus

Pi extension that hides the editor cursor in unfocused tmux panes without replacing other editor/status extensions

Package details

extension

Install pi-tmux-cursor-focus from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-tmux-cursor-focus
Package
pi-tmux-cursor-focus
Version
0.2.0
Published
May 2, 2026
Downloads
not available
Author
ndom91
License
MIT
Types
extension
Size
12.3 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-tmux-cursor-focus

A Pi extension that hides the editor cursor in unfocused tmux panes.

It wraps the active Pi editor instead of replacing it, so it works alongside other prompt/status-bar extensions.

Focused

focus

Unfocused

unfocus
Also using the pi-glance extension

What it does

  • Detects the current TMUX_PANE.
  • Installs tmux focus hooks for that pane.
  • Hides Pi's fake editor cursor when the pane loses focus.
  • Restores the cursor when focus returns.
  • Keeps any existing editor wrapper instead of replacing it.

Installation

pi install npm:pi-tmux-cursor-focus

Or test without installing

pi -e npm:pi-tmux-cursor-focus

tmux setup

Enable tmux focus events:

set -g focus-events on

Reload tmux after changing the config:

tmux source-file ~/.tmux.conf

License

MIT