For GTK-3 applications you can try setting the key
gtk-decoration-layout in ~/.config/gtk-3.0/settings.ini.
For example:
# ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-decoration-layout=:minimize,maximize,close
CommandThe gsettings appliescommand can be used to apply these settings without rebooting.
For examplerestarting the desktop environment:
gsettings set org.gnome.desktop.wm.preferences button-layout :close