hyprwm / contrib

Community scripts and utilities for Hypr projects
MIT License
294 stars 39 forks source link

Unintuitive Behavior with wait #81

Closed D1zzl3D0p closed 10 months ago

D1zzl3D0p commented 10 months ago

Hi, I found grimblast through the hyprland awesome list, and I had it installed through the AUR; however, I found that the behavior involving the wait flag and when the subject was 'output' or 'active' was rather unintuitive.

As is, the script grabs the active window, then waits 5 seconds before taking a screenshot. In the case of 'area' and 'screen' this is exactly how you would expect things to be; however, for the other 2 options, the active window/output often ends up being whatever window/output the command was run in, with output, it's fine, as you can switch workspaces, though it isn't ideal. In the case of window, it just ends up taking a picture of the terminal, which isn't super helpful.

I was able to modify the code to my satisfaction, by just moving around when the program calls the wait function, but I thought I'd open this issue up to bring this to the dev's attention/help anyone else who found the behavior odd.

Thank you for writing such an excellent script! It's not easy to write something that's legible + intuitive + powerful, so thanks!

fufexan commented 10 months ago

Hi! If you made it work, would you mind opening a PR, or at least sharing your edit so it can be added here?

D1zzl3D0p commented 10 months ago

Done!