From 0c986f0f41f5e2da5ea1091f2e45fb7f2641541f Mon Sep 17 00:00:00 2001 From: "Daniel R. Neal" Date: Sat, 23 Jan 2021 13:11:36 -0800 Subject: [PATCH] Fix bug where highlight color was getting set even when nonexistant --- apply-colors.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apply-colors.sh b/apply-colors.sh index 26dcdf5..1486b2c 100755 --- a/apply-colors.sh +++ b/apply-colors.sh @@ -122,7 +122,9 @@ gnome_color () { BB=${1:3:2} CC=${1:5:2} - echo "#${AA}${AA}${BB}${BB}${CC}${CC}" + if [[ -n "${AA:-}" ]]; then + echo "#${AA}${AA}${BB}${BB}${CC}${CC}" + fi } hexToDec () { @@ -237,6 +239,9 @@ set_theme() { dset visible-name "'${PROFILE_NAME}'" dset background-color "'${BACKGROUND_COLOR}'" dset foreground-color "'${FOREGROUND_COLOR}'" + dset cursor-colors-set "true" + dset cursor-background-color "'${CURSOR_COLOR}'" + dset cursor-foreground-color "'${BACKGROUND_COLOR}'" if [[ -n "${HIGHLIGHT_BG_COLOR:-}" ]]; then dset highlight-colors-set "true" @@ -443,6 +448,7 @@ apply_gtk() { BACKGROUND_COLOR=$(gnome_color "$BACKGROUND_COLOR") FOREGROUND_COLOR=$(gnome_color "$FOREGROUND_COLOR") + CURSOR_COLOR=$(gnome_color "$CURSOR_COLOR") HIGHLIGHT_BG_COLOR=$(gnome_color "$HIGHLIGHT_BG_COLOR") HIGHLIGHT_FG_COLOR=$(gnome_color "$HIGHLIGHT_FG_COLOR") COLOR_01=$(gnome_color "$COLOR_01")