From 1adbae6706245355dda07f53bb7484d3baa3b3fa Mon Sep 17 00:00:00 2001 From: M Laraib Ali Date: Fri, 4 Sep 2026 18:46:15 +0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(tilix):=20fall=20back=20to?= =?UTF-8?q?=20gsettings=20when=20dconf=20has=20no=20profile=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tilix ships its profile list and default profile as schema defaults, and dconf only reports values the user has set, so both read back empty until a profile is added or renamed. DEFAULT_SLUG ended up blank, the profile path collapsed to a trailing double slash and dconf rejected it. dlist_append read the list the same way and overwrote it rather than appending, dropping the existing profile from Tilix. Read through gsettings when dconf returns nothing, seed the list before adding a profile, and stop with the usual guidance if neither resolves. Closes #320 --- apply-colors.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apply-colors.sh b/apply-colors.sh index f516ce2b0..ac37074e0 100755 --- a/apply-colors.sh +++ b/apply-colors.sh @@ -1363,6 +1363,26 @@ case "${TERMINAL}" in : ${DEFAULT_SLUG:="$(${DCONF} read ${BASE_DIR}default | tr -d \')"} + # Tilix ships the profile list as a schema default, and dconf only reports + # values the user has set, so this reads back empty until a profile is added + # or renamed. gsettings does honour schema defaults. + if [[ -z "${DEFAULT_SLUG}" ]] && [[ -n "${GS}" ]]; then + DEFAULT_SLUG="$(${GS} get com.gexperts.Tilix.ProfilesList default | tr -d \')" + + # dlist_append rebuilds the list from dconf too, so seed it before adding + # a profile or the existing one gets dropped from it. + if ! [[ ${TILIX_RES::1} =~ ^(y|Y)$ ]] && [[ -z "$(${DCONF} read ${PROFILE_LIST_KEY})" ]]; then + ${DCONF} write "${PROFILE_LIST_KEY}" "$(${GS} get com.gexperts.Tilix.ProfilesList list)" + fi + fi + + if [[ -z "${DEFAULT_SLUG}" ]]; then + printserr "Error, no saved profiles found!" \ + "Possible fix, new a profile (Tilix > Preferences > Profiles > +, then Close) and try again." \ + "You can safely delete the created profile after the installation." + exit 1 + fi + LEFT_WRAPPER="[" RIGHT_WRAPPER="]" PALETTE_DELIM="', '"