Rewrite settings handling

**Don't merge**

Integrates (rewritten) settings dialog into our window system.