Button in tool bar to hide / show sidebar

How do you add a button in the toolbar to hide/show the sidebar?

Button in tool bar to hide / show sidebar
 
 
Q