PATH:
usr
/
share
/
augeas
/
lenses
/
dist
(* Module: Xorg Parses /etc/X11/xorg.conf Authors: Raphael Pinson <raphink@gmail.com> Matthew Booth <mbooth@redhat.com> About: Reference This lens tries to keep as close as possible to `man xorg.conf` where possible. The definitions from `man xorg.conf` are put as commentaries for reference throughout the file. More information can be found in the manual. About: License This file is licensed under the LGPLv2+, like the rest of Augeas. About: Lens Usage Sample usage of this lens in augtool * Get the identifier of the devices with a "Clone" option: > match "/files/etc/X11/xorg.conf/Device[Option = 'Clone']/Identifier" About: Configuration files This lens applies to /etc/X11/xorg.conf. See <filter>. *) module Xorg = autoload xfm (************************************************************************ * Group: USEFUL PRIMITIVES *************************************************************************) (* Group: Generic primitives *) (* Variable: eol *) let eol = Util.eol (* Variable: to_eol * Match everything from here to eol, cropping whitespace at both ends *) let to_eol = /[^ \t\n](.*[^ \t\n])?/ (* Variable: indent *) let indent = Util.indent (* Variable: comment *) let comment = Util.comment (* Variable: empty *) let empty = Util.empty (* Group: Separators *) (* Variable: sep_spc *) let sep_spc = Util.del_ws_spc (* Variable: sep_dquote *) let sep_dquote = Util.del_str "\"" (* Group: Fields and values *) (* Variable: entries_re * This is a list of all patterns which have specific handlers, and should * therefore not be matched by the generic handler *) let entries_re = /([oO]ption|[sS]creen|[iI]nput[dD]evice|[dD]river|[sS]ub[sS]ection|[dD]isplay|[iI]dentifier|[vV]ideo[rR]am|[dD]efault[dD]epth|[dD]evice)/ (* Variable: generic_entry_re *) let generic_entry_re = /[^# \t\n\/]+/ - entries_re (* Variable: quoted_string_val *) let quoted_string_val = del "\"" "\"" . store /[^"\n]+/ . del "\"" "\"" (* " relax, emacs *) (* Variable: int *) let int = /[0-9]+/ (************************************************************************ * Group: ENTRIES AND OPTIONS *************************************************************************) (* View: entry_int * This matches an entry which takes a single integer for an argument *) let entry_int (canon:string) (re:regexp) = [ indent . del re canon . label canon . sep_spc . store int . eol ] (* View: entry_rgb * This matches an entry which takes 3 integers as arguments representing red, * green and blue components *) let entry_rgb (canon:string) (re:regexp) = [ indent . del re canon . label canon . [ label "red" . sep_spc . store int ] . [ label "green" . sep_spc . store int ] . [ label "blue" . sep_spc . store int ] . eol ] (* View: entry_xy * This matches an entry which takes 2 integers as arguments representing X and * Y coordinates *) let entry_xy (canon:string) (re:regexp) = [ indent . del re canon . label canon . [ label "x" . sep_spc . store int ] . [ label "y" . sep_spc . store int ] . eol ] (* View: entry_str * This matches an entry which takes a single quoted string *) let entry_str (canon:string) (re:regexp) = [ indent . del re canon . label canon . sep_spc . quoted_string_val . eol ] (* View: entry_generic * An entry without a specific handler. Store everything after the keyword, * cropping whitespace at both ends. *) let entry_generic = [ indent . key generic_entry_re . sep_spc . store to_eol . eol ] (* View: option *) let option = [ indent . del /[oO]ption/ "Option" . label "Option" . sep_spc . quoted_string_val . [ label "value" . sep_spc . quoted_string_val ]* . eol ] (* View: screen * The Screen entry of ServerLayout *) let screen = [ indent . del /[sS]creen/ "Screen" . label "Screen" . [ sep_spc . label "num" . store int ]? . ( sep_spc . quoted_string_val . [ sep_spc . label "position" . store to_eol ]? )? . eol ] (* View: input_device *) let input_device = [ indent . del /[iI]nput[dD]evice/ "InputDevice" . label "InputDevice" . sep_spc . quoted_string_val . [ label "option" . sep_spc . quoted_string_val ]* . eol ] (* View: driver *) let driver = entry_str "Driver" /[dD]river/ (* View: identifier *) let identifier = entry_str "Identifier" /[iI]dentifier/ (* View: videoram *) let videoram = entry_int "VideoRam" /[vV]ideo[rR]am/ (* View: default_depth *) let default_depth = entry_int "DefaultDepth" /[dD]efault[dD]epth/ (* View: device *) let device = entry_str "Device" /[dD]evice/ (************************************************************************ * Group: DISPLAY SUBSECTION *************************************************************************) (* View: display_modes *) let display_modes = [ indent . del /[mM]odes/ "Modes" . label "Modes" . [ label "mode" . sep_spc . quoted_string_val ]+ . eol ] (************************************************************************* * View: display_entry * Known values for entries in the Display subsection * * Definition: * > Depth depth * > FbBpp bpp * > Weight red-weight green-weight blue-weight * > Virtual xdim ydim * > ViewPort x0 y0 * > Modes "mode-name" ... * > Visual "visual-name" * > Black red green blue * > White red green blue * > Options *) let display_entry = entry_int "Depth" /[dD]epth/ | entry_int "FbBpp" /[fF]b[bB]pp/ | entry_rgb "Weight" /[wW]eight/ | entry_xy "Virtual" /[vV]irtual/ | entry_xy "ViewPort" /[vV]iew[pP]ort/ | display_modes | entry_str "Visual" /[vV]isual/ | entry_rgb "Black" /[bB]lack/ | entry_rgb "White" /[wW]hite/ | entry_str "Options" /[oO]ptions/ | empty | comment (* View: display *) let display = [ indent . del "SubSection" "SubSection" . sep_spc . sep_dquote . key "Display" . sep_dquote . eol . display_entry* . indent . del "EndSubSection" "EndSubSection" . eol ] (************************************************************************ * Group: EXTMOD SUBSECTION *************************************************************************) let extmod_entry = entry_str "Option" /[oO]ption/ | empty | comment let extmod = [ indent . del "SubSection" "SubSection" . sep_spc . sep_dquote . key "extmod" . sep_dquote . eol . extmod_entry* . indent . del "EndSubSection" "EndSubSection" . eol ] (************************************************************************ * Group: SECTIONS *************************************************************************) (************************************************************************ * Variable: section_re * Known values for Section names * * Definition: * > The section names are: * > * > Files File pathnames * > ServerFlags Server flags * > Module Dynamic module loading * > Extensions Extension Enabling * > InputDevice Input device description * > InputClass Input Class description * > Device Graphics device description * > VideoAdaptor Xv video adaptor description * > Monitor Monitor description * > Modes Video modes descriptions * > Screen Screen configuration * > ServerLayout Overall layout * > DRI DRI-specific configuration * > Vendor Vendor-specific configuration *************************************************************************) let section_re = /(Extensions|Files|ServerFlags|Module|InputDevice|InputClass|Device|VideoAdaptor|Monitor|Modes|Screen|ServerLayout|DRI|Vendor)/ (************************************************************************ * Variable: secton_re_obsolete * The following obsolete section names are still recognised for * compatibility purposes. In new config files, the InputDevice * section should be used instead. * * Definition: * > Keyboard Keyboard configuration * > Pointer Pointer/mouse configuration *************************************************************************) let section_re_obsolete = /(Keyboard|Pointer)/ (* View: section_entry *) let section_entry = option | screen | display | extmod | input_device | driver | identifier | videoram | default_depth | device | entry_generic | empty | comment (************************************************************************ * View: section * A section in xorg.conf * * Definition: * > Section "SectionName" * > SectionEntry * > ... * > EndSection *************************************************************************) let section = [ indent . del "Section" "Section" . sep_spc . sep_dquote . key (section_re|section_re_obsolete) . sep_dquote . eol . section_entry* . indent . del "EndSection" "EndSection" . eol ] (* * View: lns * The xorg.conf lens *) let lns = ( empty | comment | section )* (* Variable: filter *) let filter = incl "/etc/X11/xorg.conf" . incl "/etc/X11/xorg.conf.d/*.conf" . Util.stdexcl let xfm = transform lns filter
[+]
..
[-] mailscanner.aug
[edit]
[-] access.aug
[edit]
[-] gshadow.aug
[edit]
[-] activemq_conf.aug
[edit]
[-] gtkbookmarks.aug
[edit]
[-] activemq_xml.aug
[edit]
[-] hostname.aug
[edit]
[-] afs_cellalias.aug
[edit]
[-] mcollective.aug
[edit]
[-] aliases.aug
[edit]
[-] mdadm_conf.aug
[edit]
[-] anacron.aug
[edit]
[-] memcached.aug
[edit]
[-] approx.aug
[edit]
[-] group.aug
[edit]
[-] phpvars.aug
[edit]
[-] apt_update_manager.aug
[edit]
[-] grub.aug
[edit]
[-] puppet.aug
[edit]
[-] aptcacherngsecurity.aug
[edit]
[-] mongodbserver.aug
[edit]
[-] aptconf.aug
[edit]
[-] host_conf.aug
[edit]
[-] aptpreferences.aug
[edit]
[-] hosts.aug
[edit]
[-] aptsources.aug
[edit]
[-] hosts_access.aug
[edit]
[-] authorized_keys.aug
[edit]
[-] htpasswd.aug
[edit]
[-] automaster.aug
[edit]
[-] jettyrealm.aug
[edit]
[-] automounter.aug
[edit]
[-] mke2fs.aug
[edit]
[-] avahi.aug
[edit]
[-] jaas.aug
[edit]
[-] backuppchosts.aug
[edit]
[-] modprobe.aug
[edit]
[-] bbhosts.aug
[edit]
[-] jmxaccess.aug
[edit]
[-] bootconf.aug
[edit]
[-] modules.aug
[edit]
[-] build.aug
[edit]
[-] jmxpassword.aug
[edit]
[-] cachefilesd.aug
[edit]
[-] modules_conf.aug
[edit]
[-] carbon.aug
[edit]
[-] json.aug
[edit]
[-] cgconfig.aug
[edit]
[-] nagiosobjects.aug
[edit]
[-] cgrules.aug
[edit]
[-] kdump.aug
[edit]
[-] channels.aug
[edit]
[-] monit.aug
[edit]
[-] chrony.aug
[edit]
[-] multipath.aug
[edit]
[-] clamav.aug
[edit]
[-] keepalived.aug
[edit]
[-] cobblermodules.aug
[edit]
[-] known_hosts.aug
[edit]
[-] cobblersettings.aug
[edit]
[-] koji.aug
[edit]
[-] collectd.aug
[edit]
[-] mysql.aug
[edit]
[-] cpanel.aug
[edit]
[-] nagioscfg.aug
[edit]
[-] cron.aug
[edit]
[-] krb5.aug
[edit]
[-] crypttab.aug
[edit]
[-] netmasks.aug
[edit]
[-] cups.aug
[edit]
[-] ldif.aug
[edit]
[-] cyrus_imapd.aug
[edit]
[-] networkmanager.aug
[edit]
[-] darkice.aug
[edit]
[-] networks.aug
[edit]
[-] debctrl.aug
[edit]
[-] nrpe.aug
[edit]
[-] desktop.aug
[edit]
[-] ldso.aug
[edit]
[-] device_map.aug
[edit]
[-] lightdm.aug
[edit]
[-] dhclient.aug
[edit]
[-] nginx.aug
[edit]
[-] dhcpd.aug
[edit]
[-] limits.aug
[edit]
[-] dhcpd_140.aug
[edit]
[-] login_defs.aug
[edit]
[-] dns_zone.aug
[edit]
[-] ntpd.aug
[edit]
[-] dnsmasq.aug
[edit]
[-] nsswitch.aug
[edit]
[-] dovecot.aug
[edit]
[-] ntp.aug
[edit]
[-] dpkg.aug
[edit]
[-] odbc.aug
[edit]
[-] dput.aug
[edit]
[-] openshift_http.aug
[edit]
[-] erlang.aug
[edit]
[-] openshift_config.aug
[edit]
[-] ethers.aug
[edit]
[-] pamconf.aug
[edit]
[-] exports.aug
[edit]
[-] logrotate.aug
[edit]
[-] fai_diskconfig.aug
[edit]
[-] openvpn.aug
[edit]
[-] fonts.aug
[edit]
[-] pagekite.aug
[edit]
[-] fstab.aug
[edit]
[-] pam.aug
[edit]
[-] fuse.aug
[edit]
[-] passwd.aug
[edit]
[-] gdm.aug
[edit]
[-] httpd.aug
[edit]
[-] postfix_access.aug
[edit]
[-] inetd.aug
[edit]
[-] pbuilder.aug
[edit]
[-] inifile.aug
[edit]
[-] pg_hba.aug
[edit]
[-] inittab.aug
[edit]
[-] pgbouncer.aug
[edit]
[-] inputrc.aug
[edit]
[-] logwatch.aug
[edit]
[-] interfaces.aug
[edit]
[-] lokkit.aug
[edit]
[-] iproute2.aug
[edit]
[-] mailscanner_rules.aug
[edit]
[-] iptables.aug
[edit]
[-] php.aug
[edit]
[-] iscsid.aug
[edit]
[-] lvm.aug
[edit]
[-] util.aug
[edit]
[-] openshift_quickstarts.aug
[edit]
[-] xinetd.aug
[edit]
[-] postfix_main.aug
[edit]
[-] xendconfsxp.aug
[edit]
[-] postfix_master.aug
[edit]
[-] vfstab.aug
[edit]
[-] postfix_sasl_smtpd.aug
[edit]
[-] vmware_config.aug
[edit]
[-] postfix_transport.aug
[edit]
[-] xml.aug
[edit]
[-] postfix_virtual.aug
[edit]
[-] xorg.aug
[edit]
[-] postgresql.aug
[edit]
[-] xymon.aug
[edit]
[-] properties.aug
[edit]
[-] xymon_alerting.aug
[edit]
[-] protocols.aug
[edit]
[-] yum.aug
[edit]
[-] puppet_auth.aug
[edit]
[-] puppetfile.aug
[edit]
[-] vsftpd.aug
[edit]
[-] puppetfileserver.aug
[edit]
[-] anaconda.aug
[edit]
[-] pylonspaste.aug
[edit]
[-] pythonpaste.aug
[edit]
[-] qpid.aug
[edit]
[-] quote.aug
[edit]
[-] rabbitmq.aug
[edit]
[-] redis.aug
[edit]
[-] webmin.aug
[edit]
[-] reprepro_uploaders.aug
[edit]
[-] resolv.aug
[edit]
[-] rhsm.aug
[edit]
[-] rmt.aug
[edit]
[-] rsyncd.aug
[edit]
[-] rsyslog.aug
[edit]
[-] rx.aug
[edit]
[-] samba.aug
[edit]
[-] schroot.aug
[edit]
[-] securetty.aug
[edit]
[-] sep.aug
[edit]
[-] services.aug
[edit]
[-] shadow.aug
[edit]
[-] shells.aug
[edit]
[-] shellvars.aug
[edit]
[-] shellvars_list.aug
[edit]
[-] simplelines.aug
[edit]
[-] simplevars.aug
[edit]
[-] sip_conf.aug
[edit]
[-] slapd.aug
[edit]
[-] slapd_140.aug
[edit]
[-] smbusers.aug
[edit]
[-] solaris_system.aug
[edit]
[-] soma.aug
[edit]
[-] spacevars.aug
[edit]
[-] splunk.aug
[edit]
[-] squid.aug
[edit]
[-] ssh.aug
[edit]
[-] sshd.aug
[edit]
[-] sshd_140.aug
[edit]
[-] sssd.aug
[edit]
[-] stunnel.aug
[edit]
[-] subversion.aug
[edit]
[-] sudoers.aug
[edit]
[-] sysconfig.aug
[edit]
[-] sysconfig_route.aug
[edit]
[-] sysctl.aug
[edit]
[-] syslog.aug
[edit]
[-] systemd.aug
[edit]
[-] thttpd.aug
[edit]
[-] tuned.aug
[edit]
[-] up2date.aug
[edit]
[-] updatedb.aug
[edit]
[-] wine.aug
[edit]