# sway window hider daemon automatically hides windows, by looking into /proc. when a new window is spawned in sway, it looks for the pid, and recursivelly looks for parent pids until it finds the terminal listed, or init. in the case it finds the terminal, it sends any windows attached to that pid to the scratchpad, and marks the window hidden with the pid of the new process. once a window closes, it sees if any scratchpad windows have that pid marked, and if so, unhides them.