Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-06-08 21:23:42

corrupt
Member
Registered: 2010-11-24
Posts: 7

Is there a graceful way to reload a panel applet?

Preface:  I wrote a script that runs when it detects my usb wifi device is attached.  When inserted, it change's netload's watched interface from wlan0 to wlan1, and vice-versa when removed. 

In order for netload to use the updated config file, I have to pkill 'xfce4-netload-plugin' and the applet automatically respawns and parses it correctly.  This works great, but my problem is, when I insert/remove too many times (resulting in lots of respawns), a warning message comes up asking me if I really want to reload the applet again.

My question is, is there a graceful way to reload panel applets so that won't trigger this message?

Offline

#2 2012-08-03 14:34:47

jules
Member
Registered: 2012-08-03
Posts: 2

Re: Is there a graceful way to reload a panel applet?

The following command will cause the entire panel to restart itself:

dbus-send --print-reply --dest=org.xfce.Panel /org/xfce/Panel org.xfce.Panel.Terminate boolean:true

This might be a little drastic, but would achieve your intended goals.

Offline

#3 2012-08-23 20:08:58

corrupt
Member
Registered: 2010-11-24
Posts: 7

Re: Is there a graceful way to reload a panel applet?

Thanks Jules!  This method actually has actually helped me a-lot on another script I am making.

Offline

Board footer

Powered by FluxBB