@@ -90,7 +90,12 @@ if [[ -f "$KEYBOARD_CONFIG" ]]; then
9090 # KEYBOARD_COMMAND contains the full command string (e.g. "static ff0000")
9191 # Split into array to avoid eval
9292 read -r -a CMD_ARGS <<< " $KEYBOARD_COMMAND"
93- " $RGB_BIN " " ${CMD_ARGS[@]} " 2> /dev/null || true
93+ echo " Restoring keyboard RGB: ${CMD_ARGS[*]} "
94+ if " $RGB_BIN " " ${CMD_ARGS[@]} " 2>&1 ; then
95+ echo " Keyboard RGB restored successfully"
96+ else
97+ echo " Warning: Keyboard RGB restore failed" >&2
98+ fi
9499
95100 # Handle legacy format (COMMAND + ARG1, ARG2, etc.)
96101 elif [[ -n " ${COMMAND:- } " && -n " ${ARGC:- } " ]] && [[ -x " $RGB_BIN " ]]; then
@@ -102,8 +107,15 @@ if [[ -f "$KEYBOARD_CONFIG" ]]; then
102107 args+=(" $val " )
103108 fi
104109 done
105- " $RGB_BIN " " ${args[@]} " 2> /dev/null || true
110+ echo " Restoring keyboard RGB (legacy): ${args[*]} "
111+ if " $RGB_BIN " " ${args[@]} " 2>&1 ; then
112+ echo " Keyboard RGB restored successfully"
113+ else
114+ echo " Warning: Keyboard RGB restore failed" >&2
115+ fi
106116 fi
117+ else
118+ echo " No keyboard RGB config found at $KEYBOARD_CONFIG "
107119fi
108120
109121# Restore rear window/lightbar RGB settings
@@ -112,16 +124,20 @@ if [[ -f "$WINDOW_CONFIG" ]]; then
112124 WINDOW_COLOR=$( get_config_var " $WINDOW_CONFIG " " WINDOW_COLOR" )
113125
114126 if [[ -n " ${WINDOW_BRIGHTNESS:- } " ]] && [[ -x " $WINDOW_BIN " ]]; then
115- " $WINDOW_BIN " --lightbar " $WINDOW_BRIGHTNESS " 2> /dev/null || true
127+ echo " Restoring lightbar brightness: $WINDOW_BRIGHTNESS "
128+ " $WINDOW_BIN " --lightbar " $WINDOW_BRIGHTNESS " 2>&1 || echo " Warning: Lightbar brightness restore failed" >&2
116129 fi
117130
118131 # Restore color if present (format: R,G,B)
119132 if [[ -n " ${WINDOW_COLOR:- } " ]] && [[ -x " $WINDOW_BIN " ]]; then
120133 IFS=' ,' read -r R G B <<< " $WINDOW_COLOR"
121134 if [[ -n " ${R:- } " && -n " ${G:- } " && -n " ${B:- } " ]]; then
122- " $WINDOW_BIN " --color " $R " " $G " " $B " 2> /dev/null || true
135+ echo " Restoring lightbar color: R=$R G=$G B=$B "
136+ " $WINDOW_BIN " --color " $R " " $G " " $B " 2>&1 || echo " Warning: Lightbar color restore failed" >&2
123137 fi
124138 fi
139+ else
140+ echo " No lightbar RGB config found at $WINDOW_CONFIG "
125141fi
126142
127143exit 0
0 commit comments