Moved lots of functionality from i3 int othe xsession.