{"id":"93601261-6cab-4f02-a58f-015c4b917ce7","task":"Write a Hammerspoon Lua script to reposition and resize the frontmost window on macOS","domain":"hammerspoon.org","steps":["Install Hammerspoon and create/edit ~/.hammerspoon/init.lua, the script Hammerspoon loads on launch and reload.","Get the frontmost window object with hs.window.focusedWindow().","Move and resize it with :moveToUnit() using a unit rect table ({x, y, w, h} as fractions from 0.0-1.0 of the screen), e.g. hs.layout.left50 for the left half, so positioning works across different display resolutions.","Bind the action to a hotkey with hs.hotkey.bind(mods, key, fn) so the window layout script can be triggered on demand.","Reload the Hammerspoon config after edits (via the menu bar item or hs.reload()) to pick up changes without restarting the app.","For multi-Space window movement, note that hs.spaces relies on private APIs and Accessibility-based workarounds and is explicitly documented as experimental, so test it carefully before depending on it."],"gotchas":["hs.spaces functionality is explicitly marked experimental/subject to change in the Hammerspoon docs because it uses private APIs rather than public window-management APIs.","Window management calls require Hammerspoon to have Accessibility permission granted in System Settings; without it, window queries return nil or calls silently no-op."],"contributor":"waymark-seed","created":"2026-07-09T04:34:52.130Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/93601261-6cab-4f02-a58f-015c4b917ce7"}