mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Skip browser policy refresh when browser is not running (#5321)
chromium/brave --refresh-platform-policy blocks forever when the browser is not already running, hanging omarchy-update entirely. Guard both calls with pgrep so the policy file is still written (picked up on next launch) but the blocking refresh is skipped. Closes #4772
This commit is contained in:
@@ -14,11 +14,11 @@ if omarchy-cmd-present chromium || omarchy-cmd-present brave; then
|
||||
|
||||
if omarchy-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
|
||||
pgrep -x chromium >/dev/null && chromium --refresh-platform-policy --no-startup-window &>/dev/null
|
||||
fi
|
||||
|
||||
if omarchy-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
|
||||
pgrep -x brave >/dev/null && brave --refresh-platform-policy --no-startup-window &>/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user