# Put the buttons to the left side, run command:
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,maximize,minimize:'
# revert the buttons back to right side, run command:
gsettings set org.gnome.desktop.wm.preferences button-layout ':close,maximize,minimize'