Hi,

I disagree with the "Much simpler". Everytime a java programm just
execs an external programm "some how" handles its output and tries to
do something intelligent with it, somewhere a small cute kitten dies.

I think Hectors idea to hook into the library is the only feasible way,
if some integration should happen. The hard part will be to adapt the
complex cases, where a detail action is supplied and/or a component is
passed in. These are also the questions that IMHO need to be answered
before we can talk about integration. A half working notification API
is a no-go.

Greetings

Matthias

Am Sonntag, den 17.05.2020, 15:19 -0400 schrieb Tim Boudreau:
> If you're talking about notification-daemon, there is a command-line
> utility you could just exec, if present (maybe not as elegant, but
> also not
> as invasive or fragile).  As an example, the following is the script
> I put
> in /etc/acpi/actions to make the volume button turn up the volume on
> my
> laptop under Gentoo Linux:
> 
> export DISPLAY=:0
> VOLUME=`/usr/bin/amixer -c 0 set Master 5%+ | grep Playback | grep
> "Front
> Left:" | cut -b24-`
> eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u tim
> openbox)/environ)"
> NSOUT=`sudo -u tim /usr/bin/notify-send -t 750 --icon
> /usr/share/icons/gnome-human/32x32/status/audio-volume-high.png
> "Volume
> $VOLUME"`
> 
> which generates a nice notification with what the volume has been
> changed
> to.  What you need to do is simpler.  The relevant thing to call is
> /usr/bin/notify-send - *but *you will need $DISPLAY and
> $DBUS_SESSION_ADDRESS set correctly.  But unlike my situation, where
> the
> script runs as another user and I have to fish around for all that
> stuff,
> all you need to do is call /usr/bin/notify-send "Whatever you want to
> tell
> the user"
> 
> Much simpler.
> 
> -Tim
> 
> On Sat, May 16, 2020 at 7:26 AM Hector Espert <
> hectorespertpa...@gmail.com>
> wrote:
> 
> > Hi everybody.
> > 
> > After the first proposal to integrate the native linux notification
> > system
> > https://github.com/apache/netbeans/pull/1948, I started to work in
> > the
> > notifications module to expose an API.
> > 
> > 
> > My idea is to allow to extend the notifications system and
> > integrate it
> > with the native notifications system via a future module or a
> > external
> > plugin without break the current behavior.
> > 
> > 
> > I created a Draft PR with the first draft of the notifications API
> > to
> > receive your feedback about that.
> > https://github.com/apache/netbeans/pull/2142
> > 
> > 
> > Regards
> > 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to