Add coverage to dev-requirements
Add some .gitignores
Big refactor

Factor out wmctrl into its own lib.

Also refactor the code and tests to enable testing without patching.