Use libxdg-basedir for finding config files
Also add a new config file path:
{$XDG_CONFIG_DIRS,$XDG_CONFIG_HOME}/compton/compton.conf
(For those not familiar with xdg: now compton will look for
~/.config/compton/compton.conf too)
Closes #62
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
deps = [
|
||||
cc.find_library('m'),
|
||||
cc.find_library('ev'),
|
||||
dependency('xcb', version: '>=1.9.2')
|
||||
dependency('xcb', version: '>=1.9.2'),
|
||||
]
|
||||
|
||||
srcs = ['compton.c', 'win.c', 'c2.c', 'x.c', 'config.c', 'diagnostic.c', 'string_utils.c']
|
||||
@@ -25,7 +25,8 @@ if get_option('xinerama')
|
||||
endif
|
||||
|
||||
if get_option('config_file')
|
||||
deps += [dependency('libconfig', version: '>=1.4', required: true)]
|
||||
deps += [dependency('libconfig', version: '>=1.4', required: true),
|
||||
dependency('libxdg-basedir', required: true)]
|
||||
cflags += ['-DCONFIG_LIBCONFIG']
|
||||
srcs += [ 'config_libconfig.c' ]
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user