[gnome-settings-daemon/wip/carlosg/xwayland-startup-side-channel: 2/2] xsettings: Install script to load Xresources



commit c46c67021f853a4cd3f73f478544829428e63f6f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Nov 15 11:43:00 2019 +0100

    xsettings: Install script to load Xresources
    
    Since it's a bit iffy who should do that, just do it ourselves. This way
    old X11 clients will have the intended UI colors, etc.

 plugins/xsettings/00-xrdb     | 9 +++++++++
 plugins/xsettings/meson.build | 5 +++++
 2 files changed, 14 insertions(+)
---
diff --git a/plugins/xsettings/00-xrdb b/plugins/xsettings/00-xrdb
new file mode 100755
index 00000000..a047e8b3
--- /dev/null
+++ b/plugins/xsettings/00-xrdb
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+userresources=$HOME/.Xresources
+sysresources=/etc/X11/Xresources
+
+# merge in defaults
+[ -r "$sysresources" ] && xrdb -nocpp -merge "$sysresources"
+[ -r "$userresources" ] && xrdb -merge "$userresources"
+
diff --git a/plugins/xsettings/meson.build b/plugins/xsettings/meson.build
index fb4ef4cf..f91b9637 100644
--- a/plugins/xsettings/meson.build
+++ b/plugins/xsettings/meson.build
@@ -46,6 +46,11 @@ foreach program: programs
   )
 endforeach
 
+install_data(
+  files('00-xrdb'),
+  install_dir: join_paths(gsd_sysconfdir, 'xdg/Xwayland-session.d')
+)
+
 test_py = find_program('test.py')
 
 envs = [


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]