initial commit

This commit is contained in:
Bernardo Magri
2026-04-01 17:06:01 +01:00
parent 12cdfaeeef
commit 33deeb494b
526 changed files with 12287 additions and 1 deletions

24
bin/nomarchy-theme-set-browser Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
CHROMIUM_THEME=~/.config/nomarchy/current/theme/chromium.theme
if nomarchy-cmd-present chromium || nomarchy-cmd-present brave; then
if [[ -f $CHROMIUM_THEME ]]; then
THEME_RGB_COLOR=$(<$CHROMIUM_THEME)
THEME_HEX_COLOR=$(printf '#%02x%02x%02x' ${THEME_RGB_COLOR//,/ })
else
# Use a default, neutral grey if theme doesn't have a color
THEME_RGB_COLOR="28,32,39"
THEME_HEX_COLOR="#1c2027"
fi
if nomarchy-cmd-present chromium; then
echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\", \"BrowserColorScheme\": \"device\"}" | tee "/etc/chromium/policies/managed/color.json" >/dev/null
chromium --refresh-platform-policy --no-startup-window >/dev/null
fi
if nomarchy-cmd-present brave; then
echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\", \"BrowserColorScheme\": \"device\"}" | tee "/etc/brave/policies/managed/color.json" >/dev/null
brave --refresh-platform-policy --no-startup-window >/dev/null
fi
fi