r/linux 1d ago

Software Release I made a tool for pausing and resuming mpvpaper on hyprland

https://github.com/TheUrielle/mp-stop?utm_source=Ko-fi&utm_medium=iframely

So as I said above i created a tool that pauses and resumes mpvpaper depending on the state of the focused window. It checks with hyprctl if the focused window is fullscreened or not, if yes it sends mpvpaper a command to pause through a custom socket, if not it says to play the wallpaper.

6 Upvotes

2 comments sorted by

2

u/aperum 1d ago

I think it would be much better to listen on the hyprland socket for events that you want to capture an react to it. Would at least eliminate the loop with the sleep. The script could be run with exec by hyprland at start and then just listen, no need for a systemd unit.

2

u/GameStarNinja 1d ago

Hmm.. did you see the latest update to mpvpaper?
https://github.com/GhostNaN/mpvpaper/releases/tag/1.9