How listen or change the tool option , like brush size etc?

I just posted an example for that … check it out. This one specifically sets the minimum opacity, but you can easily set any other variable like brush size etc.