mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
* No using custom chromium.desktop any more * Spacing * Rely on $OMARCHY_PATH * Add common pkg and cmd functions for use in migrations and elsewhere * Simple pkg-adds * Later migration does it * Ensure running migrations on older installs have the new pkg/cmds available * Spacing * Use new abstractions * Installed in later migration * Needless comment * Use new commands * Fix package name from 'batt' to 'bat'
25 lines
697 B
Bash
25 lines
697 B
Bash
echo "Switch to Omarchy Chromium for synchronized theme switching"
|
|
|
|
set_theme_colors() {
|
|
if [[ -f ~/.config/omarchy/current/theme/chromium.theme ]] && command -v chromium &>/dev/null; then
|
|
chromium --no-startup-window --set-theme-color="$(<~/.config/omarchy/current/theme/chromium.theme)"
|
|
else
|
|
# Use a default, neutral grey if theme doesn't have a color
|
|
chromium --no-startup-window --set-theme-color="28,32,39"
|
|
fi
|
|
}
|
|
|
|
if cmd-present chromium; then
|
|
pkg-remove chromium
|
|
pkg-add omarchy-chromium
|
|
|
|
if pgrep -x chromium; then
|
|
if gum confirm "Chromium must be restarted. Ready?"; then
|
|
pkill -x chromium
|
|
set_theme_colors
|
|
fi
|
|
else
|
|
set_theme_colors
|
|
fi
|
|
fi
|