Hammerspoon Window Control

Control macOS window positions and sizes via Hammerspoon commands.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/mshuffett/dotfiles --skill hammerspoon-window-control
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Hammerspoon Window Control
Source: https://github.com/mshuffett/dotfiles/tree/main/agents/knowledge/atoms/claude-skill-archive/hammerspoon-window-control
Command: npx skills add https://github.com/mshuffett/dotfiles --skill hammerspoon-window-control

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides fine-grained control over macOS window management, enabling the creation of custom window layouts and seamless integration with tiling window managers like hhtwm.

Core Features & Use Cases

  • Precise Window Manipulation: Set exact window positions and sizes using direct Hammerspoon commands.
  • Hybrid Tiling Control: Query hhtwm's state and make targeted adjustments without triggering full retiles.
  • Custom Layout Creation: Define and apply unique window arrangements for specific workflows.
  • Use Case: Quickly arrange your coding environment with your editor on the left half of the screen and your terminal and browser occupying the right half, each taking up a specific portion.

Quick Start

Use the Hammerspoon Window Control skill to set the frontmost window to occupy the left half of the main screen.

Frequently Asked Questions about Hammerspoon Window Control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate macOS window layouts with Hammerspoon?

Automate macOS window layouts by using Hammerspoon commands to set exact window positions and sizes programmatically. You can define and apply custom window arrangements for specific workflows without manual resizing.

Can I query hhtwm state and make adjustments without triggering a full retile?

Yes, you can query hhtwm state and make targeted adjustments to individual windows without triggering a full retile. This hybrid tiling control allows precise modifications within your existing tiling window manager setup.

Does this window management approach work with custom coding environments on macOS?

Yes, this macOS window management approach works with custom coding environments by allowing you to define exact window arrangements. You can position your editor on the left half and your terminal and browser on the right half.

What is the best way to set exact window positions and sizes on macOS?

The best way to set exact window positions and sizes on macOS is by using direct Hammerspoon commands for precise window manipulation. This enables programmatic window positioning for custom layout creation.

Do I need a tiling window manager installed to use Hammerspoon window control?

No, a tiling window manager is not required to use Hammerspoon window control. While it integrates seamlessly with managers like hhtwm for hybrid control, you can also create and apply custom layouts independently.

Why use Hammerspoon for window management instead of other macOS automation tools?

Use Hammerspoon for window management when you need fine-grained programmatic control over window positioning and state querying. It uniquely enables hybrid control strategies and custom layout creation that standard tools lack.