unofficial mirror of 
 help / color / mirror / code / Atom feed
* bug#67314: xorg-configuration's extra-config should support file-like objects
@ 2023-11-20 23:33 Ian Eure
  0 siblings, 0 replies; only message in thread
From: Ian Eure @ 2023-11-20 23:33 UTC (permalink / raw)
  To: 67314

I needed to tweak some xorg settings (set scroll direction, enable
tearfree, etc).  On other distros, this is done by dropping files 
config snippets into /etc/xorg.conf.d.

On Guix, this needs to be done through the extra-config field of 
xorg-configuration record.  That field requires a list of strings, 
means the configurations need to be inlined into the config, which 
verbose and unsightly.

For example:

       (append (list (service openssh-service-type)
                       (keyboard-layout keyboard-layout)
                         "Section \"InputClass\"
                         Identifier \"Touchpads\"
                         MatchIsTouchpad \"on\"

                         Driver \"libinput\"

                         Option \"ClickMethod\" \"clickfinger\"
                         Option \"DisableWhileTyping\" \"on\"
                         Option \"NaturalScrolling\" \"on\"
                         Option \"Tapping\" \"off\"

The manual states that extra-config takes "a list of strings or
objects," but doesn’t indicate what type of object is expected. 
If I
pass a file-like object, like this:

       (append (list (service openssh-service-type)
                       (keyboard-layout keyboard-layout)
                        (list (local-file 

The resulting Xorg configutation has the store paths for those 
added to it, instead of their contents.  This is an invalid
configuation, rendering Xorg unable to start.

I was able to split the difference by reading the file contents 
into the
config, ala:

      (keyboard-layout keyboard-layout)
       (map (lambda (file)
              (call-with-port (open-file (string-append "xorg/" 
              file ".conf") "r") get-string-all))
            '("radeon" "elecom-huge" "trackpad")))))

But this feels like a graceless hack to me.

The situation would be drastically simplified if extra-config 
file-like objects.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-20 23:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 23:33 bug#67314: xorg-configuration's extra-config should support file-like objects Ian Eure

Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).