platform-window-position

Community

Pixel-perfect terminal overlays on macOS and Linux

Authorhafley66
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Getting the absolute screen-pixel position and size of the terminal emulator window to correctly align overlay elements with the terminal content across macOS and Linux.

Core Features & Use Cases

  • Cross-platform window geometry retrieval using macOS CGWindowListCopyWindowInfo and Linux tools like xdotool, XGetWindowAttributes, and xwininfo.
  • Supports multiple coordinate origins (window frame, content area, and cell grid) and offset calculations to ensure overlays align with visible text.
  • Provides a polling strategy to track window moves for live overlay updates, with an optional Accessibility API path on macOS for more precise measurements.

Quick Start

Run the module to emit the current terminal window position and size for a given process ID.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: platform-window-position
Download link: https://github.com/hafley66/claude-research/archive/main.zip#platform-window-position

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.