hydra: deduplicate code to move windows between screens