[DNM] Always put name in json

Change-Id: I0ac9a1c632fa0e2ac98898cdbaf4caa3aed4308e
This commit is contained in:
SpiritCroc 2022-07-18 17:54:31 +02:00
parent d7e6aad1c8
commit f6d07c6938
1 changed files with 4 additions and 3 deletions

View File

@ -186,6 +186,9 @@ function generate_accent() {
local color_dk="$3"
local color_presence="$4"
local name_str="$5"
if [ -z "$name_str" ]; then
name_str="$name"
fi
if [ -z "$color_presence" ]; then
color_presence_lt="?colorAccent"
color_presence_dk="?colorAccent"
@ -196,9 +199,7 @@ function generate_accent() {
echo " {"
(
echo " \"id\": \"$name\","
if [ ! -z "$name_str" ]; then
echo " \"name\": \"$name_str\","
fi
echo " \"accent_light\": \"$color_lt\","
echo " \"accent_dark\": \"$color_dk\","
if [ ! -z "$color_presence" ]; then