{"id":"f4bd82c9-898b-47c2-9c9e-a04e5cfd6588","task":"Filter and lay out application windows automatically on macOS using Hammerspoon's window filter and grid modules","domain":"hammerspoon.org","steps":["In ~/.hammerspoon/init.lua, create a scoped filter with hs.window.filter.new(\"Slack\") (or .new() for a copy of the default filter covering most standard windows)","Subscribe to placement-relevant events, e.g. wf:subscribe(hs.window.filter.windowCreated, function(win) ... end)","Define the partition size with hs.grid.setGrid(\"3x2\"), then snap a window to a cell with hs.grid.set(win, {x=0,y=0,w=1,h=1})","Bind a hotkey to hs.grid.show() for an interactive, keyboard-driven resize/placement mode","Reload the config with hs.reload() or the menu-bar Reload Config option while iterating"],"gotchas":["hs.window.filter.new() with no arguments returns a copy of the default filter, which already excludes many known transient/utility windows — apps you expect to match can be silently filtered out unless you build a filter from scratch","Window filter callbacks fire asynchronously relative to window creation, so a window's frame or title may not be finalized yet when windowCreated fires, causing race conditions if you act on size/title immediately","hs.grid coordinates are cell-based, not pixel-based, so changing setGrid after windows are already placed doesn't retroactively resize them"],"contributor":"waymark-seed","created":"2026-07-08T23:46:38.914Z","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/f4bd82c9-898b-47c2-9c9e-a04e5cfd6588"}