labwc/include
Johan Malm 698c7ace07 config: support merging multiple config files
Add the -m|--merge-config command line option to iterate backwards over
XDG Base Dir paths and read config/theme files multiple times.

For example if both ~/.config/labwc/rc.xml and /etc/xdg/labwc/rc.xml
exist, the latter will be read first and then the former (if
--merge-config is enabled).

When $XDG_CONFIG_HOME is defined, make it replace (not augment)
$HOME/.config. Similarly, make $XDG_CONFIG_DIRS replace /etc/xdg when
defined.

XDG Base Dir Spec does not specify whether or not an application (or a
compositor!) should (a) define that only the file under the most important
base directory should be used, or (b) define rules for merging the
information from the different files.

ref: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

In the case of labwc there is a use-case for both positions, just to be
clear, the default behaviour, described by position (a) above, does NOT
change.

This change affects the following config/theme files:
  - rc.xml
  - menu.xml
  - autostart
  - environment
  - themerc
  - themerc-override
  - Theme buttons, for example max.xbm

Instead of caching global config/theme directories, create lists of paths
(e.g.  '/home/foo/.config/labwc/rc.xml', '/etc/xdg/labwc/rc.xml', etc).
This creates more common parsing logic and just reversing the direction
of iteration and breaks early if config-merge is not wanted.

Enable better fallback for themes. For example if a particular theme does
not exist in $HOME/.local/share/themes, it will be searched for in
~/.themes/ and so on. This also applies to theme buttons which now
fallback on an individual basis.

Avoid using stat() in most situations and just go straight to fopen().

Fixes #1406
2024-01-18 20:20:36 +00:00
..
button theme: move more button fallback logic to theme.c 2023-12-21 02:42:23 +01:00
common config: support merging multiple config files 2024-01-18 20:20:36 +00:00
config config: support merging multiple config files 2024-01-18 20:20:36 +00:00
input input: add missing new lines 2024-01-10 21:10:11 +00:00
menu menu: use wl_list instead of array 2023-10-10 06:17:37 +01:00
action.h action: add If and ForEach actions 2023-10-01 14:17:29 +01:00
buffer.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
debug.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
decorations.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
dnd.h chase (dnd): refactor to use wlroot's scene_drag_icon 2023-12-03 18:24:26 +00:00
idle.h Add support for ext_idle_notify_v1.. 2023-07-09 08:26:33 +01:00
labwc.h seat: re-map tablet to output on output change 2024-01-10 21:10:11 +00:00
layers.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
meson.build Make xwayland support optional 2020-12-30 10:29:21 +00:00
node.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
placement.h view: honor automatic placement when adjusting floating geometry 2023-12-30 16:50:09 +00:00
regions.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
resistance.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
resize_indicator.h Add window resize indicator 2023-08-19 18:37:16 +02:00
session-lock.h session-lock: reconfigure for output layout changes 2023-10-05 20:10:37 +01:00
snap.h Add snap to window edge framework 2023-10-19 19:09:42 +01:00
ssd-internal.h src/ssd: refactor button hover and maximize toggle 2023-12-08 20:55:50 +00:00
ssd.h feat: add Shade/Unshade/ToggleShade actions 2024-01-15 21:37:36 +00:00
theme.h theme: use non-hover button variants as fallback 2023-12-21 02:42:23 +01:00
view-impl-common.h view: commonize sub-view logic in view_move_to_front/back() 2023-10-21 15:40:56 +01:00
view.h feat: add Shade/Unshade/ToggleShade actions 2024-01-15 21:37:36 +00:00
window-rules.h window-rules: add fixedPosition property 2023-11-10 21:46:15 +01:00
workspaces.h desktop: switch workspaces and optionally raise in desktop_focus_view() 2023-09-28 03:38:51 +02:00
xwayland.h output,xwayland: Add support for _NET_WM_STRUT_PARTIAL 2023-11-29 06:48:31 +00:00