Show Metrics OR Kerning with script

Is it possible to Show/Hide Metrics and Kerning in Text View separately via a script? For Metrics I mean the little crosses and the sidebearing values, for Kerning I mean the blue and yellow color marks.

I would like to have only the Kerning color marks, because I find them hard to see when the Metric marks and values are also there.

There is currently now way to have only the kerning marker. I have a look and see what I can do.