User config files are located at `${XDG_CONFIG_HOME:-$HOME/.config/labwc/}`
with the following four files being used:
-| file | man page
-| ------------- | --------
-| [rc.xml] | [labwc-config(5)], [labwc-actions(5)]
-| [menu.xml] | [labwc-menu(5)]
-| [autostart] | [labwc(1)]
-| [environment] | [labwc-config(5)]
+| file | man page
+| ------------------ | --------
+| [rc.xml] | [labwc-config(5)], [labwc-actions(5)]
+| [menu.xml] | [labwc-menu(5)]
+| [autostart] | [labwc(1)]
+| [environment] | [labwc-config(5)]
+| [themerc-override] | [labwc-theme(5)]
The example [rc.xml] has been kept simple. For all options and default values,
see [rc.xml.all]
[autostart]: docs/autostart
[environment]: docs/environment
[themerc]: docs/themerc
+[themerc-override]: docs/themerc
[labwc(1)]: https://labwc.github.io/labwc.1.html
[labwc-config(5)]: https://labwc.github.io/labwc-config.5.html
- environment
- menu.xml
- rc.xml
+- themerc-override
+
+See `man labwc-config and `man labwc-theme` for further details.
-See man labwc-config for further details.
- ${XDG_CONFIG_HOME:-$HOME/.config}/labwc
- ${XDG_CONFIG_DIRS:-/etc/xdg}/labwc
+The configuration directory location can be override with the -C command line
+option.
+
All configuration and theme files except autostart are re-loaded on receiving
signal SIGHUP.
A theme consists of a themerc file and optionally some xbm icons.
+Theme settings specified in themerc can be overridden by creating a
+'themerc-override' file in the configuration directory, which is normally
+$HOME/.config/labwc/ but can be a few other locations as described in
+labwc-config(5).
+
# DATA TYPES
*color RGB values*
'environment',
'menu.xml',
'README',
+ 'themerc',
'rc.xml',
'rc.xml.all'
],
+# This file contains all themerc options with default values
+#
+# System-wide and local themes can be overridden by creating a copy of this
+# file and renaming it to $HOME/.config/labwc/themerc-override. Be careful
+# though - if you only want to override a small number of specific options,
+# make sure all other lines are commented out or deleted.
+
# general
border.width: 1
padding.height: 3
fclose(stream);
}
+static void
+theme_read_override(struct theme *theme)
+{
+ char f[4096] = { 0 };
+ snprintf(f, sizeof(f), "%s/themerc-override", rc.config_dir);
+
+ FILE *stream = fopen(f, "r");
+ if (!stream) {
+ wlr_log(WLR_INFO, "no theme override '%s'", f);
+ return;
+ }
+
+ wlr_log(WLR_INFO, "read theme-override %s", f);
+ char *line = NULL;
+ size_t len = 0;
+ while (getline(&line, &len, stream) != -1) {
+ char *p = strrchr(line, '\n');
+ if (p) {
+ *p = '\0';
+ }
+ process_line(theme, line);
+ }
+ free(line);
+ fclose(stream);
+}
+
struct rounded_corner_ctx {
struct wlr_box *box;
double radius;
*/
theme_builtin(theme);
+ /* Read <data-dir>/share/themes/$theme_name/openbox-3/themerc */
theme_read(theme, theme_name);
+
+ /* Read <config-dir>/labwc/themerc-override */
+ theme_read_override(theme);
+
post_processing(theme);
create_corners(theme);
xbm_load(theme);