sardemff7 / eventd

A simple daemon to track remote or local events and do actions the user wants to
https://www.eventd.org
Other
46 stars 4 forks source link

Feature request: Moving bubbles #40

Open maralorn opened 6 years ago

maralorn commented 6 years ago

Hey, I love eventd. Really awesome!

Humans are evolutionary trained to react to movement in their peripheral vision, after all it might be a tiger. For this reason I really want my notification bubbles to slide in (or something) I don't care much what movement exactly, at least some of them. It is much stronger in getting attention, especially on a big screen. This should of course be optional per action.

Do you think, this would be doable?

I totally understand if you think this is outside the intended scope of the project.

sardemff7 commented 6 years ago

Hi, thanks for loving eventd :-)

It is totally doable, but I don’t think it belongs to the nd plugin. Abstracting the window system is already a bit hard, abstracting animation code would be even trickier.

I thought about doing the abstraction in a second process (for X11 and Windows), a Wayland compositor that would handle placement and animations and some stuff like that, but that would be a really big amount of work.

However, a Wayland compositor can do that already (see the video on eventd’s website webm mp4) and I’m sure an X11 compositor can do that kind of animations too, like Compiz can. But maybe standalone compositors are not all able to do that.

maralorn commented 6 years ago

Okay, do I understand correctly, that you think this should be done by an external program? I actually have some working bash code which runs xdotool in a loop to slide a dunst notification bubble. It's a bad solution but it works surprisingly well. Writing something like this has 3 obstacles:

Of course it would be awesome, if there where an existing X11 compositor, which can do it.

sardemff7 commented 6 years ago

For eventd, it is easier to delegate such a feature to the compositor, yes. Under Windows it might not be possible but I don’t mind for now, I’m pretty sure I don’t have that many Windows users. :-) Under Wayland, it’s very easy (as it is demonstrated), though the direction issue is not handled for now. Under X11, it is common to have either a standalone compositor (like compton) or a built-in (the WM) compositor (like Compiz), and it usually handles these features. Though under X11, any client can do what you want, you’ll just have to write a tiny daemon monitoring windows creation, checking the PID to match eventd’s and then move the bubble around.