Added hat switches to glop and implemented them for darwin