Files
omarchy/migrations/1760401344.sh
Derek 800962b18f fix: prevent Chromium crash when moving windows between monitors (#2394)
* fix: prevent Chromium crash when moving windows between monitors

Adds --disable-features=WaylandWpColorManagerV1 to Chromium and Brave
flag configs to prevent crashes when moving windows between monitors or
workspaces on Hyprland. This is a workaround for a Chromium/Wayland
color management conflict.

Upstream Chromium fix exists but won't reach stable for ~a month. This
provides a temporary bridge until the fix lands in stable releases.

Fixes #2384
Refs #2184
Refs: https://github.com/hyprwm/Hyprland/issues/11957
Refs: https://github.com/hyprwm/Hyprland/discussions/11961
Refs: https://issues.chromium.org/issues/40263183
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/7003036

* Add migration to update existing Chromium/Brave configs with crash fix

Adds migration script to append --disable-features=WaylandWpColorManagerV1
to existing users' chromium-flags.conf and brave-flags.conf files.

The script:
- Checks if config files exist before attempting to modify them
- Uses grep to verify the flag isn't already present
- Only adds the flag and explanatory comment if needed
- Handles both Chromium and Brave configurations

This ensures existing Omarchy users get the Hyprland crash workaround
without needing to manually update their configs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix warnings and make conditional explicit

---------

Co-authored-by: Derek Castillo <d-cas@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
2025-10-14 11:44:55 +03:00

16 lines
953 B
Bash

echo "Add Chromium crash workaround flag for Hyprland to existing configs"
# Add flag to chromium-flags.conf if it exists and doesn't already have it
if [[ -f ~/.config/chromium-flags.conf ]]; then
if ! grep -qF -- "--disable-features=WaylandWpColorManagerV1" ~/.config/chromium-flags.conf; then
sed -i '$a # Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957\n--disable-features=WaylandWpColorManagerV1' ~/.config/chromium-flags.conf
fi
fi
# Add flag to brave-flags.conf if it exists and doesn't already have it
if [[ -f ~/.config/brave-flags.conf ]]; then
if ! grep -qF -- "--disable-features=WaylandWpColorManagerV1" ~/.config/brave-flags.conf; then
sed -i '$a # Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957\n--disable-features=WaylandWpColorManagerV1' ~/.config/brave-flags.conf
fi
fi