PERL : Libconf::Glueconf::X::XF86Config C/PYTHON/RUBY : X/XF86Config
Libconf::Glueconf::X::XF86Config is a template that handles the xorg.conf and XF86Config configuration files.
$xorg = new Libconf::Glueconf::X::XF86Config({ filename => '/etc/X11/xorg.conf' });
use Data::Dumper;
print Dumper([keys %$xf86config]);
print Dumper($xf86config);
$xf86config->write_conf();
creates the template
$xorg = new Libconf::Glueconf::X::XF86Config({
.. arguments ..
})
the options are the same as in Libconf::Templates::XF86Config, look there to have the details.
See <Libconf::Glueconf> for general methods