Changing the taskbar dynamically via a script

Garton, Jamie Jamie.Garton at adc.com
Thu Feb 26 08:25:00 CET 2004


Yeah I thought of that but it then locks the user into starting one
machine second so it could see the first machine.

The grand plan is to have 2 morphix liveCDs running on 2 separate  machines
connected via plip or ethernet or both, with the ability of both machines 
being able to see each other.

I noticed that adding an item or menu to the panel via the gui does not
change 
the ~/.xfce4/xfce4rc file until it is shutdown. So maybe changing the panel
at
run time may only be done by calls altering the internal data structure.

I'm not sure how hard that would be. Anyone have an idea on how to do it and

how hard it would be?

cheers 
Jamie

-----Original Message-----
From: Jasper Huijsmans [mailto:jasper at xfce.org]
Sent: Thursday, 26 February 2004 7:59 AM
To: XFCE general discussion list
Subject: RE: Changing the taskbar dynamically via a script


Op di 24-02-2004, om 23:48 schreef Garton, Jamie:
> In the past when I was using KDE, I had a script that would find out the 
> exported mount points (using nfs) of a particular server, then it would 
> create icons to these auto-mounted on the desktop.
> 
> I was hoping that I could run my script from a menu icon on the panel
> and then populate all the mount points as items under that menu icon.
> 
> I thought because you can add/remove items/menus from the panel via the
> gui, there would be some command line way of doing the same thing.
> 
> Btw, this is all going to be on a Morphix liveCD so the exported mount 
> points could be different ever time it is started, depending on what 
> other machines it is connected to.
> 

That sounds very interesting. 

Well, the panel reads ~/.xfce4/xfce4rc or /etc/xfce4/xfce4rc, so you
probably could write a script that creates the menu items, before
starting xfce. That would work.

Have a look at the default xfce4rc, the format should be easy enough to
understand. Perhaps you can create a sort of pre-config file that is
transformed into the real config file on startup.

e.g., pre-xfce4rc:
===
<?xml version="1.0"?>
<Xfce>
  <Panel orientation="0" layer="0" size="1" popupposition="1"
icontheme="Curve" groups="3">
  </Panel>
  <Groups>
    <Group>
      <Popup/>
      <Control id="-2" popup="0">
        <Command term="0" sn="0">xfterm4</Command>
        <Tooltip>Terminal</Tooltip>
        <Icon id="12"/>
      </Control>
    </Group>
    <Group>
      <Popup>
      <!-- MOUNTPOINTS -->
      </Popup>
      <Control id="-2" popup="1">
        <Command term="0" sn="1">xffm</Command>
        <Tooltip>File manager</Tooltip>
        <Icon id="2"/>
      </Control>
    </Group>
    <Group>
    <Group>
      <Popup/>
      <Control id="-1" filename="libclock.so">
        <XfceClock Clock_type="2" Toggle_military="1" Toggle_am_pm="1"
Toggle_secs="0"/>
      </Control>
    </Group>
  </Groups>
</Xfce>
===

and then replace '<!-- MOUNTPOINTS -->' with the appropriate items.

	Jasper


_______________________________________________
Xfce mailing list
Xfce at xfce.org
http://lunar-linux.org/mailman/listinfo/xfce
http://www.xfce.org



More information about the Xfce mailing list