minimizing to tray and fix tab/space mix

the minimizing behavior is the same as https://tn123.org/mintrayr/