aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/WallustConfig.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/scripts/WallustConfig.sh')
-rwxr-xr-xconfig/hypr/scripts/WallustConfig.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/config/hypr/scripts/WallustConfig.sh b/config/hypr/scripts/WallustConfig.sh
new file mode 100755
index 00000000..44ddff0b
--- /dev/null
+++ b/config/hypr/scripts/WallustConfig.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+# ==================================================
+# KoolDots (2026)
+# Project URL: https://github.com/LinuxBeginnings
+# License: GNU GPLv3
+# SPDX-License-Identifier: GPL-3.0-or-later
+# ==================================================
+# Wallust version compatibility helpers
+#
+# Purpose:
+# - Wallust v3 reads ~/.config/wallust/wallust.toml (this repo ships a v3 config)
+# - Wallust v4 alpha uses a different config schema; users frequently install it
+# via wallust-git, which will fail to parse the v3 config.
+#
+# This file detects Wallust major version and sets arrays used by scripts:
+# - wallust_args: args to pass to wallust for wallpaper-derived palette generation
+# - wallust_kitty_args: args to pass to wallust for kitty-only palette generation
+
+wallust_args=()
+wallust_kitty_args=()
+
+wallust_prepare_args() {
+ wallust_args=()
+ wallust_kitty_args=()
+
+ command -v wallust >/dev/null 2>&1 || return 0
+
+ local version major
+ version=$(wallust --version 2>/dev/null | awk '{print $2}')
+ major=${version%%.*}
+
+ # Wallust v4 supports -C/--config-file.
+ if [ -n "$major" ] && [ "$major" -ge 4 ]; then
+ local v4_cfg="$HOME/.config/wallust/wallust-v4.toml"
+ local v4_kitty_cfg="$HOME/.config/wallust/wallust-kitty-v4.toml"
+
+ if [ -f "$v4_cfg" ]; then
+ wallust_args=(-C "$v4_cfg")
+ fi
+ if [ -f "$v4_kitty_cfg" ]; then
+ wallust_kitty_args=(-C "$v4_kitty_cfg")
+ fi
+ fi
+}
+
+wallust_prepare_args
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage