There is no public API for this. There may be hackery tricks around it, but there's no public API and no proper way of doing it. The spaces are considered something for the user to be entirely in control of that can not be taken over by programs normally.
PS. There are dedicated forums on here for programming related questions