From 1e4d2b4be7ad20dd108503fb65c264673ca6457b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 29 Sep 2026 09:55:45 +0200 Subject: feat(install): track rofi scripts, wire nvim and hypr-theme, merge qt/gtk keys The rofi menus' launch scripts lived loose in ~/bin, so the themes were tracked and the only things that open them were not. They now live in bin/ and are symlinked under the names hypr-theme's keybindings call. neovim gets a generated colorscheme: catppuccin/nvim with all 26 palette colours overridden from the active scheme, selected by rewriting only the colorscheme line of init.vim. hypr-theme is linked as the whole of ~/.config/hypr, leaving a real directory there alone. The qt-gtk templates were reference copies nothing installed. They now hold theme keys only and ini_merge writes them into the live qt5ct, qt6ct and gtk3 files key by key, keeping every other line; tests/ini-merge.sh checks it. The stale kvantum.kvconfig template is gone, install.sh writes that file. Fresh-machine fixes: settings.ini and ~/.config/gtk-4.0 are created when missing instead of aborting under set -e, and conky is found as a sibling checkout and skipped when absent, in udt-palette as well as install.sh. Co-Authored-By: Claude Opus 5.5 --- tests/ini-merge.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 tests/ini-merge.sh (limited to 'tests') diff --git a/tests/ini-merge.sh b/tests/ini-merge.sh new file mode 100755 index 0000000..b495c9c --- /dev/null +++ b/tests/ini-merge.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Check install.sh's ini_merge: fresh file, partial file, idempotence. +# Copyright (C) 2026 Danilo M. +# Licensed under the GNU General Public License v2 only. +set -euo pipefail + +repo="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +eval "$(sed -n '/^ini_merge() {/,/^}/p' "$repo/install.sh")" +tmp="$(mktemp -d)" +trap 'rm -rf "$tmp"' EXIT + +printf '[A]\nx=1\ny=2\n[B]\nz=3\n' > "$tmp/tmpl" + +ini_merge "$tmp/tmpl" "$tmp/fresh" +diff <(printf '[A]\nx=1\ny=2\n[B]\nz=3\n') "$tmp/fresh" + +# Existing key replaced, foreign key kept, missing key lands before the blank +# line that separates sections, missing section appended. +printf '[A]\nx=0\nkeep=me\n\n[C]\nw=4\n' > "$tmp/part" +ini_merge "$tmp/tmpl" "$tmp/part" +diff <(printf '[A]\nx=1\nkeep=me\ny=2\n\n[C]\nw=4\n[B]\nz=3\n') "$tmp/part" + +cp "$tmp/part" "$tmp/again" +ini_merge "$tmp/tmpl" "$tmp/again" +diff "$tmp/part" "$tmp/again" + +echo "ini-merge OK" -- cgit v1.2.3