send-notification icon indicating copy to clipboard operation
send-notification copied to clipboard

Support native notification icons

Open hmdebenque opened this issue 6 years ago • 3 comments

I am using linux notify-send module and I would want to use native icon instead of specifying one but API do not support it.

Please would you consider this feature ?

hmdebenque avatar Mar 12 '18 13:03 hmdebenque

Hi, what do you mean by native icon ? not setting an icon at all and let notify-send display a notification with its default behaviour ?

jcgay avatar Mar 13 '18 07:03 jcgay

Huh, not setting an Icon will throw an exception:

public static void main(String [] args) {
    Notifier notifier = new SendNotification()
                                .initNotifier();

    Notification notification = Notification.builder().level(Notification.Level.WARNING).message("test test test")
                                 .title("hello")
                                        .subtitle("world")
                                        .build();

    notifier.send(notification);


    notifier.close();
    System.out.println("exiting");
    System.exit(0);
  }

results in: Exception in thread "main" java.lang.IllegalStateException: Missing required properties: icon at fr.jcgay.notification.AutoValue_Notification$Builder.build(AutoValue_Notification.java:166)

calsirlerilor avatar Jul 09 '18 11:07 calsirlerilor

An icon is mandatory at the moment, because I haven't got any case where I don't need one. But I guess I could go with a default behavior when none is set... ?

jcgay avatar Aug 10 '18 06:08 jcgay