I haven't really tested, maybe it isn't a problem, but i fear that with this new queuing of messages, it might get a bit complicated if one would do something like:
herbe -x 500 "msg1"
herbe -x 1000 "msg2"
herbe "msg3"
That was actually my main motivation adding the commandline-options ( #3 ), having different geometry for different notificatoins. I have been experimenting a bit with a flow like this:
tl;dr as long as a notification is visible a daemon and socket is open
herbe "msg1"
# will start a herbe daemon and open a "local" socket, and start a timeout timer,
# when time is up, notification, daemon and socket are killed
herbe -t 10 "msg2"
# if the daemon is running, -t 10 and "msg2" is sent to the daemon via the socket,
# "msg2" notificatoin will get created and displayed immediately,
# and "10 seconds would get added to the current timeout". (kind of)
Benefit of doing it this way is that herbe by default will be "executed in the background", like dunstify. But it will be easy to also add a --block option so that execution of herbe command will terminate when the notification is terminated. It will also be easy to add an ID system, so one can emulate f.i. dunstify --replace ID which is a feature i use a lot with dunstify.
It will however make the program a little bit more complex, but not that much. And it is almost not fair calling it a daemon either, since the daemon only exist as long as there are visible notifications. It will also ofc make startup a little bit slower when the daemon and socket doesn't exist (meaning most of the time). imho, that will never be a problem for any usecase of a notification program.
And i also envision this:
herbe -x 10 -y 10 "msg1"
herbe -x 100 -y 500 "msg2"
Above code would result in two independent notifications displayed at the same time, but managed by the same process (the daemon). More options like --font and --color could ofc also be used.
But sometimes one might want to queue a notification (having the same behaviour as herbe currently have), and i don't think it would be a big deal adding a --queue option.
I have tried some of this out in my own messy not public fork, and i don't think any external libs are needed, and when it is clean it will not be that noisy (both linecount and complexity). But as you can imagine, this change will not really work as a "patch"...
I haven't really tested, maybe it isn't a problem, but i fear that with this new queuing of messages, it might get a bit complicated if one would do something like:
That was actually my main motivation adding the commandline-options ( #3 ), having different geometry for different notificatoins. I have been experimenting a bit with a flow like this:
tl;dr as long as a notification is visible a daemon and socket is open
Benefit of doing it this way is that herbe by default will be "executed in the background", like dunstify. But it will be easy to also add a
--blockoption so that execution of herbe command will terminate when the notification is terminated. It will also be easy to add an ID system, so one can emulate f.i. dunstify--replaceID which is a feature i use a lot with dunstify.It will however make the program a little bit more complex, but not that much. And it is almost not fair calling it a daemon either, since the daemon only exist as long as there are visible notifications. It will also ofc make startup a little bit slower when the daemon and socket doesn't exist (meaning most of the time). imho, that will never be a problem for any usecase of a notification program.
And i also envision this:
Above code would result in two independent notifications displayed at the same time, but managed by the same process (the daemon). More options like
--fontand--colorcould ofc also be used.But sometimes one might want to queue a notification (having the same behaviour as herbe currently have), and i don't think it would be a big deal adding a
--queueoption.I have tried some of this out in my own messy not public fork, and i don't think any external libs are needed, and when it is clean it will not be that noisy (both linecount and complexity). But as you can imagine, this change will not really work as a "patch"...