The function did not fulfill its purpose. The tag 'name:NVIDIA-G' only appears in 'xrandr --listproviders', when on-demand has already been enabled. If nvidia or intel are enabled, it does not appear. As a consequence the option is only listed in the drop down menu, when it is active. There was no chance to select it, if this was not the case. Not sure whether there is another option to check, whether on-demand is actually supported by the running X-server. Nevertheless, this implementation did not serve its purpose.
The function did not fulfill its purpose. The tag 'name:NVIDIA-G' only appears in 'xrandr --listproviders', when on-demand has already been enabled. If nvidia or intel are enabled, it does not appear. As a consequence the option is only listed in the drop down menu, when it is active. There was no chance to select it, if this was not the case. Not sure whether there is another option to check, whether on-demand is actually supported by the running X-server. Nevertheless, this implementation did not serve its purpose.