Skip to content

Disable animations during screenshots#4493

Open
hattapauzi wants to merge 2 commits intobasecamp:devfrom
hattapauzi:fix/screenshot-disable-animations
Open

Disable animations during screenshots#4493
hattapauzi wants to merge 2 commits intobasecamp:devfrom
hattapauzi:fix/screenshot-disable-animations

Conversation

@hattapauzi
Copy link

Summary

  • temporarily disable Hyprland animations while omarchy-cmd-screenshot runs to avoid mid-transition captures
  • restore the previous animation state on exit

Temporarily turns off Hyprland animations while omarchy-cmd-screenshot runs to avoid capturing mid-transition frames.
@hattapauzi hattapauzi changed the base branch from master to dev February 4, 2026 06:19
@dhh
Copy link
Member

dhh commented Feb 4, 2026

How is the problem you're trying to solve manifesting itself? Why not just wait until whatever anim you're looking at is done?

@hattapauzi
Copy link
Author

hattapauzi commented Feb 5, 2026

The issue shows up when triggering the screenshot during an active animation (workspace switch or window open/close). The captured frame can be in mid‑transition, so the window appears partially offset/blurred or mid‑fade. Waiting isn’t always works out because the screenshot flow itself (slurp + wayfreeze) can be invoked while animations are still running. The change freezes a stable frame by temporarily disabling animations only for the capture, then restores them immediately after.

I could not reproduce this behavior (screenshot result that's messed up by the animation) in my other machine with the same custom animations config but the animation is still indeed rolling when invoking the omarchy-cmd-screenshot ... After applying this pull request that I did, I can confirm that the animation is not rolling therefore not messing up my screenshot anymore...

https://github.com/user-attachments/assets/88897d1b-0249-4360-9da0-f53be2e1661b
Before using custom animations (animations provided by themes)

https://github.com/user-attachments/assets/683219d9-a354-476e-8c58-643a7b0c7dac
After using my own custom animations

https://github.com/user-attachments/assets/8529abe5-cde0-43d7-bce9-78ffb8d7a3c6
Just some example script I wrote to toggle between different scripts (some of them messed up the screenshot)

I can provide the messed up screenshot later when I got back to that machine...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants