mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Proper fix for using device dark mode in Chrome
This commit is contained in:
@@ -24,4 +24,4 @@ sudo mkdir -p /etc/brave/policies/managed
|
|||||||
sudo chmod a+rw /etc/brave/policies/managed
|
sudo chmod a+rw /etc/brave/policies/managed
|
||||||
|
|
||||||
# Default Chromium to follow system appearance ("device") instead of dark
|
# Default Chromium to follow system appearance ("device") instead of dark
|
||||||
echo '{"browser":{"theme":{"color_scheme":0}}}' | sudo tee /usr/lib/chromium/initial_preferences >/dev/null
|
echo '{"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' | sudo tee /usr/lib/chromium/initial_preferences >/dev/null
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
echo "Fix Chromium appearance mode to also set color_scheme2 (the field Chromium actually reads now)"
|
||||||
|
|
||||||
|
echo '{"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' | sudo tee /usr/lib/chromium/initial_preferences >/dev/null
|
||||||
|
|
||||||
|
# Update existing Chromium profiles so color_scheme2 follows the system, not dark
|
||||||
|
PREFS="$HOME/.config/chromium/Default/Preferences"
|
||||||
|
if [[ -f "$PREFS" ]] && command -v jq &>/dev/null; then
|
||||||
|
jq '.browser.theme.color_scheme = 0 | .browser.theme.color_scheme2 = 0' "$PREFS" > "$PREFS.tmp" && mv "$PREFS.tmp" "$PREFS"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user