Add a module for setting the X background

When enabled, EXWM will automatically set the background color either
the user-specified color, or theme's default background color. This will
even work with compositors such as picom.

* background.el: add it.
* exwm-core (exwm--intern-atom): optionally take a conn.
This commit is contained in:
Steven Allen 2022-07-25 09:33:05 -07:00 committed by Adrián Medraño Calvo
parent e9cc0962cc
commit 4e1bb33f37
2 changed files with 203 additions and 2 deletions

View file

@ -155,9 +155,9 @@ Nil can be passed as placeholder."
(if height xcb:ConfigWindow:Height 0))
:x x :y y :width width :height height)))
(defun exwm--intern-atom (atom)
(defun exwm--intern-atom (atom &optional conn)
"Intern X11 ATOM."
(slot-value (xcb:+request-unchecked+reply exwm--connection
(slot-value (xcb:+request-unchecked+reply (or conn exwm--connection)
(make-instance 'xcb:InternAtom
:only-if-exists 0
:name-len (length atom)