ubuntu minimize window by clicking on dock

C++
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
Source

Also in C++: