Improves upon 18e425ed by using the first assigned workspace instead of the last one. The order isn't explicitly guaranteed to be the same as in the config, but in general works.
18e425ed