mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Set device appearance as the default for chromium
So we will be switching correctly from light/dark mode depending on the theme.
This commit is contained in:
@@ -22,3 +22,6 @@ sudo chmod a+rw /etc/chromium/policies/managed
|
||||
|
||||
sudo mkdir -p /etc/brave/policies/managed
|
||||
sudo chmod a+rw /etc/brave/policies/managed
|
||||
|
||||
# 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
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
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
|
||||
Reference in New Issue
Block a user