Files
David Heinemeier Hansson 691b11901c Set device appearance as the default for chromium
So we will be switching correctly from light/dark mode depending on the
theme.
2026-04-11 20:09:51 -04:00

10 lines
454 B
Bash

echo "Set Chromium appearance mode to device (follow system) by default"
echo '{"browser":{"theme":{"color_scheme":0}}}' | sudo tee /usr/lib/chromium/initial_preferences >/dev/null
# Update existing Chromium profiles to use "device" instead of "dark"
PREFS="$HOME/.config/chromium/Default/Preferences"
if [[ -f "$PREFS" ]] && command -v jq &>/dev/null; then
jq '.browser.theme.color_scheme = 0' "$PREFS" > "$PREFS.tmp" && mv "$PREFS.tmp" "$PREFS"
fi