From 6094c907b26e21f13373bae6bf3306dbae40af3c Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Wed, 26 Aug 2026 15:08:16 -0400 Subject: Update deps, small changes and cleanup Signed-off-by: Andrew Opalach --- src/util/color_palette.h | 14 ++++++++++++++ src/util/meson.build | 5 ++--- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'src/util') diff --git a/src/util/color_palette.h b/src/util/color_palette.h index 7330135..b0cc9f4 100644 --- a/src/util/color_palette.h +++ b/src/util/color_palette.h @@ -2,6 +2,7 @@ #include #include +#include enum { CAMU_COLOR_BACKGROUND = 0, @@ -33,3 +34,16 @@ struct camu_color_palette { extern struct camu_color_palette global_color_palette; bool camu_colors_maybe_init(str *path); + +static inline void camu_colors_default_init() +{ + char *home_env = getenv("HOME"); + if (home_env) { + str color_palette; + al_str_from(&color_palette, home_env); + nn_path_append(&color_palette, &al_str_c(".config")); + nn_path_append(&color_palette, &al_str_c("colors.json")); + camu_colors_maybe_init(&color_palette); + al_str_free(&color_palette); + } +} diff --git a/src/util/meson.build b/src/util/meson.build index c2c3c3d..2da5b08 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -4,9 +4,8 @@ if get_option('portal').enabled() blake3 = dependency('libblake3', required: false, allow_fallback: false) if not blake3.found() blake3_opts = cmake.subproject_options() - reltype = is_minsize ? 'MinSizeRel' : 'Release' - blake3_opts.add_cmake_defines({ 'CMAKE_BUILD_TYPE': is_debug ? 'Debug' : reltype }) - blake3_opts.add_cmake_defines({ 'CMAKE_POSITION_INDEPENDENT_CODE': true }) + blake3_opts.add_cmake_defines({ 'CMAKE_BUILD_TYPE': is_debug ? 'Debug' : cmake_reltype }) + blake3_opts.add_cmake_defines({ 'CMAKE_POSITION_INDEPENDENT_CODE': is_static_shared_lib }) blake3 = cmake.subproject('BLAKE3', options: blake3_opts).dependency('blake3') endif util_deps += [blake3] -- cgit v1.2.3-101-g0448