Code Monkey home page Code Monkey logo

Comments (17)

sardemff7 avatar sardemff7 commented on June 8, 2024

Since I don’t know which image you are testing with, I could only guess the issue where from the Height=-1 after looking at the code.
I pushed 0346968 and aa3c9d9 which should fix your issue.
Anchor issue was probably a side effect (you cannot align without the proper size) as it works for me with both -1 and a specific height.

Can you try master and tell me if it’s fixed for you?

from eventd.

leotaku avatar leotaku commented on June 8, 2024

No, still does not work on master for me.

from eventd.

leotaku avatar leotaku commented on June 8, 2024

These are my compilation options, maybe I'm missing sth.:

mesonFlags = [
    "-Dnd-wayland=false"
    "-Dlibcanberra=false"
    "-Dipv6=false"
    "-Dsystemd=false"
    "-Dnotification-daemon=true"
    "-Dnd-xcb=true"
    "-Dnd-fbdev=true"
    "-Dim=false"
    "-Dsound=false"
    "-Dtts=false"
    "-Dwebhook=false"
    "-Dlibnotify=true"
    "-Dlibcanberra=false"
    "-Dgobject-introspection=false"
    "-Ddebug=false"

    "-Ddbussessionservicedir=etc/dbus"
];

from eventd.

sardemff7 avatar sardemff7 commented on June 8, 2024

I need the exact event (and possibly images if they are not inlined) to properly test that then.
If you use eventc, you’d want to enable debug and check the output for the event. If you use notify-send or a libnotify client, you’d want debug too, for the hints.

from eventd.

leotaku avatar leotaku commented on June 8, 2024

Here is my log:
log

And the Images (For me it happens with any Image I use):
white
13912255622_57551a3d76_k

from eventd.

sardemff7 avatar sardemff7 commented on June 8, 2024

Hum, your images are bigger than the text, what do you expect exactly? Do you want the text at the bottom of the bubble?
If not, could you please send a screenshot of the bubble you get, and some mockup of the bubble you expect?

from eventd.

leotaku avatar leotaku commented on June 8, 2024

Maybe I'm misunderstanding something here. Whatever I put in W/H the image is scaled to the same (tiny) size. I would like to configure said size so I am able to better see the image. (I'm not currently at my desk,
please tell me if you still want the screenshot and mockup, or if this explains it)

from eventd.

sardemff7 avatar sardemff7 commented on June 8, 2024

Using your config, your wallpaper and the following command, here is a screenshot of the result here on master:
eventc notification non-generic -d title=\"Someone\" -d message=\'1\\n2\\n333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333\\n4\\n\<span\ font=\"Monospace\"\>went\</span\>\ \<a\ href=\"http://example.org\"\>offline\</a\>\ \&lt\;\' -f image=test.jpg -d icon=\'theme:mpv\'
screenshot from 2018-07-13 19-51-41

from eventd.

leotaku avatar leotaku commented on June 8, 2024

OK, that's definitely not what I get... (I'd be more than happy if it was) I only used notify-send though, so that could maybe be the problem? On the other hand, is the image intended to scale with the number of rows/columns? (I thought I had tried that, but maybe I haven't) I'll update you as soon as I get home.

from eventd.

sardemff7 avatar sardemff7 commented on June 8, 2024

Make sure to stop/kill all instances of eventd when you rebuild it. If you don’t launch it yourself, relying on D-Bus activation, then eventctl stop should be enough to stop it.

from eventd.

sardemff7 avatar sardemff7 commented on June 8, 2024

The number of lines of text is not important for scaling, only for alignment (the text is always align at the top, so to actually see the image not at the top, you have to make the bubble higher than the image).

from eventd.

leotaku avatar leotaku commented on June 8, 2024

Notify-send:
notify-send
Eventc/Yours:
eventc

from eventd.

leotaku avatar leotaku commented on June 8, 2024

Sorry, yours does actually look the exact same with my original config. I changed something. Notify-send still displays it wrong though. So the issue is with that plugin?

from eventd.

leotaku avatar leotaku commented on June 8, 2024

Updated:
eventc

from eventd.

sardemff7 avatar sardemff7 commented on June 8, 2024

Ok, I see what is going on. With notify-send you send the image as the icon. Unless in Overlay style (with the icon as an emblem over the image), the icon does not replace the image if the image is lacking.
There are several solutions:

  • Use Image=icon in [Notification] if you never intend to use other clients that may use both image and icon.
  • Use the image-path hint: notify-send -h string:image-path:/home/sardemff7/Loisirs/Images/avatar-LiliAnne_100.png
    This is not spec-compliant because image-path is supposed to be a file:// URI or a themed icon name, but almost all notification daemons support paths in here because wrong clients just means bug reports in daemons.
    “But I could do it right here, since I am writing it myself.” will you tell me… Sadly not, because notify-send does not accept : in hint data. (I submitted a patch but it’s more or less abandoned.)
  • Change your notify-send calls to eventc calls.
    This is my preferred way because you can do it right, IOW, have specific event configurations for your specific use cases, instead of abusing the libnotify compatibility event. :-)

Anyway, the “icon replaces the image” is not written anywhere in the man pages (AFAIK), only in the state of the art of notifications page.
I will see where I can put some clarification that image and icon are two different entities to eventd.
I think it is the only notification daemon to do that, but it is advertised as such, and clients are mainly libnotify users so it uses the image-data hint in most cases.

from eventd.

leotaku avatar leotaku commented on June 8, 2024

Just setting the icon placement style to "Overlay" also seems to work. One last question: Is it by any chance possible to have the image displayed on the right side instead of the left? Btw. thank you very much for helping me!

from eventd.

sardemff7 avatar sardemff7 commented on June 8, 2024

Image is part of the “content” while icon is more like a “source identifier” to eventd nd. This is a design decision, so the image is on the left and icon either on the right or as an emblem in a corner over the image.
In the future, I want to implement a Right-to-Left option for RTL languages to keep the design coherent according to that idea. I may actually use the direction Pango can infer from the text, so I don’t have to add yet another option to the already long list, which means it’ll be harder to abuse too. :-)
If you don’t care much, you can just use Icon as image and be done with it.
ProTip: if you use specific events for your specific use cases, you can use icon as image on some and image + icon on others just as you see fit. ;-)

Edit: abusing the Overlay feature is not a solution, it’s a workaround, but you can do that, sure. :-)

from eventd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.