Macro to toggle the left and right sideber together?

I want to hide sideber in one macro

Here’s a V8 button macro screenshot:

Thank you sir

the problem is here once you activate a command with the panels hidden (mac) the left one keeps showing permanently messing up the entire toggle then both toggle but ping pong style. if there would be a way in which it remembers the last state of toggle and just adjusts these accordingly or at least autohides the left sidebar again