Macro to refresh mac touchbar?

Is there a way to make a macro that refreshes the mac touch bar?

There is an app (insomniax) that allow you to disable lid sleep on mac, which allows you to do things like download files with your laptop closed, but on macs with the touch bar, the touch bar doesn't turn back on when you reopen the computer and enable lid sleep. (to fix this you need to enable lid sleep then close and open your laptop to turn the touch bar back on).

Therefore, I want to make a macro to refresh the touch bar with a shortcut. Thanks!