Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-02-05 17:15:02

pandageek
Member
Registered: 2014-02-05
Posts: 3

how to make a script to modify xfce4 panel?

Hello!

I want to know how to modify the panel (or create another one if it's easier), setting launchers and options, in command line.

I found the xfconf-query command but i've no idea how to use it and i don't understand the documentation  http://docs.xfce.org/xfce/xfconf/xfconf-query

I hope you can help me!

Thanks

Offline

#2 2014-02-06 13:18:28

wtsch
Member
Registered: 2010-06-09
Posts: 27

Re: how to make a script to modify xfce4 panel?

Why? Different settings for different users?

Offline

#3 2014-02-06 13:54:12

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: how to make a script to modify xfce4 panel?

Setting options is easy. You can either look at the Settings Editor to see a graphic display of the configuration tree, or for xfce4-panels:

To view the panel IDs:

xfconf-query -c xfce4-panel -p /panels

To view the settings for a specific ID (in my case. panel-1):

xfconf-query -c xfce4-panel -p /panels/panel-1 -lv

To change one of the non-array settings (ie enable autohide):

xfconf-query -c xfce4-panel -p /panels/panel-1/autohide -s true

...and to disable it again:

xfconf-query -c xfce4-panel -p /panels/panel-1/autohide -s false

Working with array values is tougher because I don't think xfconf allows you to manipulate individual elements of the array. And since creating a new panel or a launcher requires array manipulation, it may not be possible. You might be able to create a wrapper function to read, store and re-write the array values (as a complete set), but I've never tested this.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2014-02-06 16:57:34

pandageek
Member
Registered: 2014-02-05
Posts: 3

Re: how to make a script to modify xfce4 panel?

thanks it works great!

where can i find the list of option to modify (like height, width, color, shortcurts,...)?

Offline

#5 2014-02-06 18:36:10

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: how to make a script to modify xfce4 panel?

pandageek wrote:

thanks it works great!

where can i find the list of option to modify (like height, width, color, shortcurts,...)?

I'm not sure I understand, but if you're asking which properties are available for modification, look at the Settings Editor (found in the Settings Manager or by running "xfce4-settings-editor").


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2014-02-06 20:07:55

pandageek
Member
Registered: 2014-02-05
Posts: 3

Re: how to make a script to modify xfce4 panel?

Thanks!
i can modify what i want exept one thing :
How can i add a launcher?

Last edited by pandageek (2014-02-06 20:25:50)

Offline

#7 2014-02-06 20:43:52

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: how to make a script to modify xfce4 panel?

As I explained earlier, it won't be easy (impossible?) because you need to manipulate array values (see panel-1/plugin-ids) and as far as I know, xfconf-query can't manipulate individual elements of an array (I might be wrong, but I can't find any info on how to do this). Thinking out loud, you may be able to create a wrapper function to read, store and re-write the array as a complete set, but these are uncharted waters (don't know if its possible).

As for what needs to be done, I would guess an array element would need to be added to /panel-Y/plugin-ids that corresponds to an entry in /plugins/plugin-XX of which the items array property points a desktop file in ~/.config/xfce4/panel/launcher-XX (where Y is a panel ID and where XX is a unique numeric value).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2014-02-07 02:20:45

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: how to make a script to modify xfce4 panel?

It's not a "command line" solution, but can't you just find the app you want in your desktop menu, drag (a representation of) it from there to the desktop, and then on to the panel you wish to place the launcher on?

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#9 2014-02-07 17:10:56

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: how to make a script to modify xfce4 panel?

DISCLAIMER: Be very careful with this code. If possible, test on spare system or in a vm. This works on my test system (in this case fedora), but I can't vouch for others. You have been warned.

Here are some steps for manually adding the abiword launcher to the bottom panel.

Informational

# list all panel properties

xfconf-query -c xfce4-panel -p /panels -lv

# list panel IDs

xfconf-query -c xfce4-panel -p /panels | grep -v "Value is an\|^$"

# list all panel plugins info (going to model after existing launcher plugin)

xfconf-query -c xfce4-panel -p /plugins -lv

Add launcher to panel-2

# 1. determine launcher id number to use - must be unique. (using 16). Determine the id of the panel to add to - must exist (using 2).

# 2. create the launcher directory (~/.config/xfce4/panel/launcher-xx)

mkdir ~/.config/xfce4/panel/launcher-16

# 3. copy launcher's .desktop file into that folder

cp /usr/share/applications/abiword.desktop ~/.config/xfce4/panel/launcher-16

# 4. create the plugin xfconf entry
# 4a. create the plugin group

xfconf-query -c xfce4-panel -p /plugins/plugin-16 -t string -s "launcher" --create

# 4b. create the plugin items property

xfconf-query -c xfce4-panel -p /plugins/plugin-16/items -t string -s "abiword.desktop" -a --create

# 5. add the new plugin ID to the existing panel array of plugins
# 5a. list the current contents of the array (make note of results for future use)

xfconf-query -c xfce4-panel -p /panels/panel-2/plugin-ids| grep -v "Value is an\|^$"

# 5b. delete the plugin-ids array

xfconf-query -c xfce4-panel -p /panels/panel-2/plugin-ids -rR

# 5c. re-create the array using the old existing ids + the new id, placing them in the order they are to be displayed (inserting 16)

xfconf-query -c xfce4-panel -p /panels/panel-2/plugin-ids -t int -s 7 -t int -s 8 -t int -s 9 -t int -s 16 -t int -s 10 -t int -s 11 -t int -s 12 -t int -s 13 -t int -s 14 --create

# 6. restart xfce4-panel

xfce4-panel -r

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2016-09-25 15:37:33

luvr
Member
From: Boom ("Tomorrowland"), Belgium
Registered: 2016-09-25
Posts: 18

Re: how to make a script to modify xfce4 panel?

ToZ wrote:

# 3. copy launcher's .desktop file into that folder

cp /usr/share/applications/abiword.desktop ~/.config/xfce4/panel/launcher-16

Not sure if I'm supposed to resurrect an old thread such as this one, but here's a little Perl script to create a typical ".desktop" file for an XFCE launcher item:

#!/usr/bin/perl

use Glib ;

$x_xfce_source = $ARGV [ 0 ] ;
$x_xfce_dest   = $ARGV [ 1 ] ;

$keyfile =  Glib::KeyFile -> new ;
$keyfile -> load_from_file ( $x_xfce_source , 'G_KEY_FILE_NONE' ) ;
$keyfile -> set_string     ( 'Desktop Entry', 'X-XFCE-Source'   , Glib -> filename_to_uri ( $x_xfce_source , undef ) ) ;

open  OUTPUT_FILE , '>' . $x_xfce_dest ;
print OUTPUT_FILE $keyfile -> to_data  ;
close OUTPUT_FILE ;

It requires two command-line arguments:

  1. The full path to the source ".desktop" file, e.g., /usr/share/applications/abiword.desktop;

  2. The full path to the destination file, e.g., ~/.config/xfce4/panel/launcher-16/147481732321.desktop.

By the way, I have recently developed a Bash script that sets up the XFCE panels for me. If anyone is interested, I won't mind posting it here.

Offline

#11 2016-09-26 00:54:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: how to make a script to modify xfce4 panel?

Thanks for posting the script - I'm sure it will be helpful

luvr wrote:

By the way, I have recently developed a Bash script that sets up the XFCE panels for me. If anyone is interested, I won't mind posting it here.

Feel free to post it - I'm sure it will be useful to someone and this will be a good reference place for it.

BTW, welcome to the forum.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#12 2016-09-26 17:23:21

luvr
Member
From: Boom ("Tomorrowland"), Belgium
Registered: 2016-09-25
Posts: 18

Re: how to make a script to modify xfce4 panel?

If you want to develop a shell script to set up your Xfce panels, then you will obviously have to understand how you can access the Xfce configuration from the command line. In this post, I will explain what I learned in order to write such a script.

The “Xfconf” Configuration Storage System

The configuration of the Xfce desktop—including the panels—is maintained by the Xfconf storage system. As the Xfce documentation describes it:

Xfconf is a hierarchical (tree-like) configuration system where the immediate child nodes of the root are called “channels”. All settings beneath the channel nodes are called “properties”.

Querying the “Xfconf” Configuration Storage System

To access the Xfconf configuration data from the command line, you can run the “xfconf-query” utility. In its simplest form, the xfconf-query command will list the Xfconf channels—e.g.:

$ xfconf-query --list

The output from this command will look something like this:

Channels:
  thunar-volman
  xsettings
  displays
  ristretto
  thunar
  xfce4-desktop
  xfce4-power-manager
  xfce4-mixer
  xfce4-session
  xfce4-panel
  xfce4-appfinder
  xfce4-keyboard-shortcuts
  xfce4-settings-editor
  xfwm4
  keyboards

If you want to access the panel settings, then you can list the contents of the “xfce4-panel” channel:

$ xfconf-query --channel 'xfce4-panel' --list

This command will list all properties that the Xfconf system maintains about the panels and the plugins that you added to them.

To view the value of one specific property, you can specify it on the “xfconf-query” command line—e.g.:

$ xfconf-query --channel 'xfce4-panel' --property '/panels'

Assuming that you are using a dual-panel setup, the output will, then, look like the following:

Value is an array with 2 items:

1
2

Note: The actual panel ids may be different. Under Xubuntu, for instance, panel ids apparently start counting from 0, instead of 1, by default.

You can also list all subproperties of a specific property, like so:

$ xfconf-query --channel 'xfce4-panel' --property '/panels' --list

If you want to obtain not only the names, but also the values of the listed properties, then you can request verbose output:

$ xfconf-query --channel 'xfce4-panel' --property '/panels' --list --verbose

Some values may be displayed as “<<UNSUPPORTED>>”; these are array values, which will get displayed only if you query their specific properties—e.g.:

$ xfconf-query --channel 'xfce4-panel' --property '/panels/panel-1/plugin-ids'

Setting Properties in the “Xfconf” Configuration Storage System

Perhaps contrary to what its name implies, the xfconf-query command can also update values in the Xfconf system. Furthermore, it can optionally create a property if it does not yet exist.

To set a single-valued (i.e., non-array) property, you will have to specify both its type and its value. The following types are supported:

  • “bool”—A boolean value, either “true” or “false”;

  • “int”—A 32-bit signed integer value, in the range from -2·147·483·648 through 2·147·483·647;

  • “uint”—A 32-bit unsigned integer value, in the range from 0 through 4·294·967·295;

  • “int64”—A 64-bit signed integer value, in the range from -9·223·372·036·854·775·808 through 9·223·372·036·854·775·807;

  • “uint64”—A 64-bit unsigned integer value, in the range from 0 through 18·446·744·073·709·551·615;

  • “double”—Presumably a double-precision floating-point value, even though it will be stored as a fixed-point value instead, with six decimal places following the decimal point;

  • “string”—A character string.

Of course, the value to which you want to set a property will have to match its type.

(P.S.: Many thanks to ToZ and jharms for pointing out the existence of the additional integer types and of the “double” type.)

Note: Positive integer values can be expressed not only in decimal notation, but also as hexadecimal or octal numbers. For instance, the biggest 32-bit signed integer value is 2147483647, which can also be written as 0x7FFFFFFF (i.e., with a leading "0x" to denote hexadecimal), or as 017777777777 (i.e., with a leading "0" to denote octal). The absolute value of a negative number can also be expressed in any of the three supported notations, e.g., -2147483647 is the same value as -0x7FFFFFFF or as -017777777777. There is one caveat to this feature, however, in that the most negative value—i.e., -2147483648, in the case of 32-bit signed integers—can only be expressed in decimal, since its absolute value (i.e., 2147483648, or 0x80000000, or 020000000000) is out of range for the type.

As an example, you may decide that you want to modify the size of your first panel (i.e., for a horizontal panel, its height, or, for a vertical panel, its width). First, you may want to find out what its current size is:

$ xfconf-query --channel 'xfce4-panel' --property '/panels/panel-1/size'

The following command will, then, modify the panel size to 32:

$ xfconf-query --channel 'xfce4-panel' --property '/panels/panel-1/size' --type int --set 32

The above command will happily update an existing property, but it will refuse to create one that does not yet exist. If you want to make sure that the property will be set, even if it is a new one, then you will have to specify the “--create” option:

$ xfconf-query --channel 'xfce4-panel' --property '/panels/panel-1/size' --create --type int --set 32

To set an array property, you will have to repeat the “--type” and “--set” options for each successive array element. There is no option to remove an element from an array, or to add an element to it; you will have to set the entire array from scratch whenever you want to modify it in any way.

For instance, if you want to add a panel, then you will first have to query the currently active panel ids:

$ xfconf-query --channel 'xfce4-panel' --property '/panels'

Value is an array with 2 items:

1
2

The following command will, then, add a third panel to your setup:

$ xfconf-query --channel 'xfce4-panel' --property '/panels' --type int --set 1 --type int --set 2 --type int --set 3

Even though the new panel will not show up on your desktop, it will have been added to the “/panels” array. To actually display the new panel, you can restart the running panel instance:

$ xfce4-panel --restart

Note that, in order to set up an array, you will have to specify at least two values; if you enter only one value, then the xfconf-query command will create a single-valued property instead. If you ever need to create an array with just a single value, then you will have to use the “--force-array” option—e.g., to request just a single panel:

$ xfconf-query --channel 'xfce4-panel' --property '/panels' --force-array --type int --set 1

Note: The --force-array option is supported, but entirely optional, if you specify multiple values on an array assignment.

Deleting Properties from the “Xfconf” Configuration Storage System

If you created a third panel, as discussed above, and subsequently updated the “/panels” array to remove the new panel again, then any of its properties will remain present in the Xfconf system—as the following command will demonstrate:

$ xfconf-query --channel 'xfce4-panel' --property '/panels/panel-3' --list

Unless you made any modifications to its setup, only the “/panels/panel-3/position” property will be listed.

To delete the value of a property, you can run the xfconf-query command with the “--reset” option—e.g.:

$ xfconf-query --channel 'xfce4-panel' --property '/panels/panel-3/position' --reset

Additionally, if you want to delete a property, and all properties beneath it, then you can add the “--recursive” option to the command:

$ xfconf-query --channel 'xfce4-panel' --property '/panels/panel-3' --reset --recursive

Closing Notes

Once you understand how you can access the “Xfconf” system from the command line, you are ready to study the types of plugins that can be added to the Xfce panels, and the methods to configure them. Some plugins, such as the Clock or the Separator, will keep their configuration entirely within the “Xfconf” storage hierarchy, while other plugins, such as the Network Monitor or the Weather Update, store their settings in external resource files. In addition, the Launcher plugin is a special case, in that it uses “.desktop” files to determine which items it will provide.

Last edited by luvr (2016-10-14 14:23:16)

Offline

#13 2016-09-27 18:00:45

luvr
Member
From: Boom ("Tomorrowland"), Belgium
Registered: 2016-09-25
Posts: 18

Re: how to make a script to modify xfce4 panel?

Bash Script to Set up the Xfce Panel Configuration

The code below is an example of my bash script to set up the Xfce panel configuration.

It is heavily data-driven, in that it consists of a bunch of array declarations that describe the panels and the plugins that must be added to them, in a sort of top-down tree-like hierarchy.

The top of the hierarchy is the “XFCE_PANELS” array, which names the panels that you want to create. The example below, for instance, will set up two panels, which it names “TOP_PANEL” and “BOTTOM_PANEL”. Each of these is the name of another array, which contains two elements; the first element identifies the panel properties (e.g., “TOP_PANEL_PROPERTIES”), while the second one identifies the panel plugins (e.g., “TOP_PANEL_PLUGINS”).

The panel properties are represented by yet another array, which identifies one or more subsets of properties—each of which is represented by a further array that lists the individual properties that make up the group. Next, each actual property is represented by a three-element array, which specifies the property name, the property type, and the property value.

The panel plugins are listed in an array, of which each element identifies a plugin. Each individual plugin is represented by a three-element array, in which the first element specifies the plugin name, the second element is an indicator of the plugin type, and the third element identifies a further variable that, depending on the plugin type, will be either an array or a string.

The script defines five plugin types:

  • “PluginProperties”—The plugin will store its configuration settings entirely in the Xfconf storage tree. Its properties will be listed in an array.

  • “PluginResources”—The plugin will store its configuration settings in a resource file. Its properties will be listed in a string variable.

  • “PluginLauncher”—The plugin is a launcher. Its configuration will be listed in two arrays, one for the launcher properties, and another one for the launcher items. Note that the launcher properties, as listed in the example code, will all remain unset (i.e., their defaults will be used).

  • “PluginNetLoad”—The plugin is the Network Monitor. This is actually a special case of the PluginResources type. It is handled separately, because the Network Monitor plugin needs to know the name of the network interface that it must monitor. However, the number of network interfaces, and their names, are system-dependent, and must, therefore, be dynamically filled in. Note that the list of network interface names (excluding the local loopback interface) is stored in the “IP_LINKS” array variable, near the top of the script.

  • The empty string—The plugin does not expose any configuration settings. No further setup is required.

A plugin property is represented by a three-element array that specifies the property name, the property type, and the property value; if the value is the empty string, then the property will remain unset (i.e., its default will be used).

A plugin resource string is simply a verbatim copy of the resource file of the plugin.

Two types of launcher items are supported by the script:

  • “LauncherSourceFile”—The item value is the full path to the “.desktop” file from which the item file must be created.

  • “LauncherSourceString”—The item value is the name of a string variable that is a verbatim copy of the item file.

Notes:

  • The script is meant to be run on a Debian system, and begins by testing if the computer is running Debian, and if the desktop environment is Xfce. To my knowledge, however, the script does not use any Debian-specific features, and it should be perfectly safe to remove the test for the system distribution name (or to make it test for a different distribution). I haven't tested it on any system except Debian, though.

  • The panel setup as created by this code is just meant as a demonstration. For instance, it adds both a Whisker Menu and an Applications Menu to the top panel—which is pretty unlikely to be used in practice. In addition, it sets up a custom launcher that does nothing but display the “/etc/hosts” file—again, this will not be considered particularly useful in practice.

  • One of my major goals in developing this script was avoiding the need to manually keep track of panel ids and plugin ids. Thus, if you want to adapt the script to your own preference, you can simply list the panels that you wish to have it create for you, and the plugins that you want it to add to each panel, without worrying about their ids. The script will automatically assign the appropriate ids to the panels and plugins.

#!/bin/bash


declare -r    XFCE_PANEL_DIRECTORY="${HOME}"'/.config/xfce4/panel'
declare -ar   IP_LINKS=( $(ip -brief link | sed --regexp-extended --quiet --expression='/^lo\b/! s/[[:space:]].*$//p' | sort) )


declare -ar   XFCE_PANELS=(   'TOP_PANEL'   'BOTTOM_PANEL'   )


declare -ar   TOP_PANEL=(      'TOP_PANEL_PROPERTIES'      'TOP_PANEL_PLUGINS'      )
declare -ar   BOTTOM_PANEL=(   'BOTTOM_PANEL_PROPERTIES'   'BOTTOM_PANEL_PLUGINS'   )


declare -ar   TOP_PANEL_PROPERTIES=(      'TOP_PANEL_PROPERTIES_POSITION'      'COMMON_PANEL_PROPERTIES'   )
declare -ar   BOTTOM_PANEL_PROPERTIES=(   'BOTTOM_PANEL_PROPERTIES_POSITION'   'COMMON_PANEL_PROPERTIES'   )


declare -ar   TOP_PANEL_PROPERTIES_POSITION=(
                                                   'PANEL_PROPERTY_POSITION_TOP'
              )
declare -ar   BOTTOM_PANEL_PROPERTIES_POSITION=(
                                                   'PANEL_PROPERTY_POSITION_BOTTOM'
              )
declare -ar   COMMON_PANEL_PROPERTIES=(
                                                   'PANEL_PROPERTY_AUTOHIDE_BEHAVIOR'
                                                   'PANEL_PROPERTY_BACKGROUND_ALPHA'
                                                   'PANEL_PROPERTY_BACKGROUND_STYLE'
                                                   'PANEL_PROPERTY_DISABLE_STRUTS'
                                                   'PANEL_PROPERTY_ENTER_OPACITY'
                                                   'PANEL_PROPERTY_LEAVE_OPACITY'
                                                   'PANEL_PROPERTY_LENGTH'
                                                   'PANEL_PROPERTY_LENGTH_ADJUST'
                                                   'PANEL_PROPERTY_MODE'
                                                   'PANEL_PROPERTY_NROWS'
                                                   'PANEL_PROPERTY_POSITION_LOCKED'
                                                   'PANEL_PROPERTY_SIZE'
                                                   'PANEL_PROPERTY_SPAN_MONITORS'
              )


declare -ar   PANEL_PROPERTY_AUTOHIDE_BEHAVIOR=(   'autohide-behavior'   'int'      '0'             )
declare -ar   PANEL_PROPERTY_BACKGROUND_ALPHA=(    'background-alpha'    'int'      '80'            )
declare -ar   PANEL_PROPERTY_BACKGROUND_STYLE=(    'background-style'    'int'      '0'             )
declare -ar   PANEL_PROPERTY_DISABLE_STRUTS=(      'disable-struts'      'bool'     'false'         )
declare -ar   PANEL_PROPERTY_ENTER_OPACITY=(       'enter-opacity'       'int'      '100'           )
declare -ar   PANEL_PROPERTY_LEAVE_OPACITY=(       'leave-opacity'       'int'      '100'           )
declare -ar   PANEL_PROPERTY_LENGTH=(              'length'              'int'      '100'           )
declare -ar   PANEL_PROPERTY_LENGTH_ADJUST=(       'length-adjust'       'bool'     'false'         )
declare -ar   PANEL_PROPERTY_MODE=(                'mode'                'int'      '0'             )
declare -ar   PANEL_PROPERTY_NROWS=(               'nrows'               'int'      '1'             )
declare -ar   PANEL_PROPERTY_POSITION_BOTTOM=(     'position'            'string'   'p=8;x=0;y=0'   )
declare -ar   PANEL_PROPERTY_POSITION_LOCKED=(     'position-locked'     'bool'     'true'          )
declare -ar   PANEL_PROPERTY_POSITION_TOP=(        'position'            'string'   'p=6;x=0;y=0'   )
declare -ar   PANEL_PROPERTY_SIZE=(                'size'                'int'      '24'            )
declare -ar   PANEL_PROPERTY_SPAN_MONITORS=(       'span-monitors'       'bool'     'false'         )


declare -ar   TOP_PANEL_PLUGINS=(
                                       'PANEL_PLUGIN_WHISKER_MENU'
                                       'PANEL_PLUGIN_APPLICATIONS_MENU'
                                       'PANEL_PLUGIN_PLACES'
                                       'PANEL_PLUGIN_DIRECTORY_MENU'
                                       'PANEL_PLUGIN_SCREENSHOT'
                                       'PANEL_PLUGIN_LAUNCHER_WEB_BROWSER'
                                       'PANEL_PLUGIN_LAUNCHER_HOSTS_FILE_VIEWER'
                                       'PANEL_PLUGIN_LAUNCHER_LIBREOFFICE'
                                       'PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_WRITER'
                                       'PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_CALC'
                                       'PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_IMPRESS'
                                       'PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_DRAW'
                                       'PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_BASE'
                                       'PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_MATH'
                                       'PANEL_PLUGIN_SEPARATOR_EXPANDING'
                                       'PANEL_PLUGIN_NOTIFICATION_AREA'
                                       'PANEL_PLUGIN_PULSEAUDIO'
                                       'PANEL_PLUGIN_BATTERY'
                                       'PANEL_PLUGIN_WEATHER_UPDATE'
                                       'PANEL_PLUGIN_SEPARATOR_TRANSPARENT'
                                       'PANEL_PLUGIN_CLOCK'
                                       'PANEL_PLUGIN_ACTION_BUTTONS'
              )
declare -ar   BOTTOM_PANEL_PLUGINS=(
                                       'PANEL_PLUGIN_SHOW_DESKTOP'
                                       'PANEL_PLUGIN_SEPARATOR_DOTS'
                                       'PANEL_PLUGIN_WINDOW_MENU'
                                       'PANEL_PLUGIN_SEPARATOR_DOTS'
                                       'PANEL_PLUGIN_WINDOW_BUTTONS'
                                       'PANEL_PLUGIN_SEPARATOR_EXPANDING'
                                       'PANEL_PLUGIN_WORKSPACE_SWITCHER'
                                       'PANEL_PLUGIN_CPU_GRAPH'
                                       'PANEL_PLUGIN_NETWORK_MONITOR'
                                       'PANEL_PLUGIN_TRASH_APPLET'
              )


declare -ar   PANEL_PLUGIN_ACTION_BUTTONS=(                 'actions'            'PluginProperties'   'ACTION_BUTTONS_PLUGIN_PROPERTIES'            )
declare -ar   PANEL_PLUGIN_APPLICATIONS_MENU=(              'applicationsmenu'   'PluginProperties'   'APPLICATIONS_MENU_PLUGIN_PROPERTIES'         )
declare -ar   PANEL_PLUGIN_BATTERY=(                        'battery'            'PluginResources'    'BATTERY_PLUGIN_RESOURCES'                    )
declare -ar   PANEL_PLUGIN_CLOCK=(                          'clock'              'PluginProperties'   'CLOCK_PLUGIN_PROPERTIES'                     )
declare -ar   PANEL_PLUGIN_CPU_GRAPH=(                      'cpugraph'           'PluginResources'    'CPU_GRAPH_PLUGIN_RESOURCES'                  )
declare -ar   PANEL_PLUGIN_DIRECTORY_MENU=(                 'directorymenu'      'PluginProperties'   'DIRECTORY_MENU_PLUGIN_PROPERTIES'            )
declare -ar   PANEL_PLUGIN_LAUNCHER_HOSTS_FILE_VIEWER=(     'launcher'           'PluginLauncher'     'LAUNCHER_HOSTS_FILE_VIEWER_PLUGIN_SETUP'     )
declare -ar   PANEL_PLUGIN_LAUNCHER_LIBREOFFICE=(           'launcher'           'PluginLauncher'     'LAUNCHER_LIBREOFFICE_SETUP'                  )
declare -ar   PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_BASE=(      'launcher'           'PluginLauncher'     'LAUNCHER_LIBREOFFICE_BASE_PLUGIN_SETUP'      )
declare -ar   PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_CALC=(      'launcher'           'PluginLauncher'     'LAUNCHER_LIBREOFFICE_CALC_PLUGIN_SETUP'      )
declare -ar   PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_DRAW=(      'launcher'           'PluginLauncher'     'LAUNCHER_LIBREOFFICE_DRAW_PLUGIN_SETUP'      )
declare -ar   PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_IMPRESS=(   'launcher'           'PluginLauncher'     'LAUNCHER_LIBREOFFICE_IMPRESS_PLUGIN_SETUP'   )
declare -ar   PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_MATH=(      'launcher'           'PluginLauncher'     'LAUNCHER_LIBREOFFICE_MATH_PLUGIN_SETUP'      )
declare -ar   PANEL_PLUGIN_LAUNCHER_LIBREOFFICE_WRITER=(    'launcher'           'PluginLauncher'     'LAUNCHER_LIBREOFFICE_WRITER_PLUGIN_SETUP'    )
declare -ar   PANEL_PLUGIN_LAUNCHER_WEB_BROWSER=(           'launcher'           'PluginLauncher'     'LAUNCHER_WEB_BROWSER_PLUGIN_SETUP'           )
declare -ar   PANEL_PLUGIN_NETWORK_MONITOR=(                'netload'            'PluginNetLoad'      'NETWORK_MONITOR_PLUGIN_TEMPLATE_RC'          )
declare -ar   PANEL_PLUGIN_NOTIFICATION_AREA=(              'systray'            'PluginProperties'   'NOTIFICATION_AREA_PLUGIN_PROPERTIES'         )
declare -ar   PANEL_PLUGIN_PLACES=(                         'places'             'PluginProperties'   'PLACES_PLUGIN_PROPERTIES'                    )
declare -ar   PANEL_PLUGIN_PULSEAUDIO=(                     'pulseaudio'         'PluginProperties'   'PULSEAUDIO_PLUGIN_PROPERTIES'                )
declare -ar   PANEL_PLUGIN_SCREENSHOT=(                     'screenshooter'      'PluginResources'    ''                                            )
declare -ar   PANEL_PLUGIN_SEPARATOR_DOTS=(                 'separator'          'PluginProperties'   'SEPARATOR_DOTS_PLUGIN_PROPERTIES'            )
declare -ar   PANEL_PLUGIN_SEPARATOR_EXPANDING=(            'separator'          'PluginProperties'   'SEPARATOR_EXPANDING_PLUGIN_PROPERTIES'       )
declare -ar   PANEL_PLUGIN_SEPARATOR_TRANSPARENT=(          'separator'          'PluginProperties'   'SEPARATOR_TRANSPARENT_PLUGIN_PROPERTIES'     )
declare -ar   PANEL_PLUGIN_SHOW_DESKTOP=(                   'showdesktop'        ''                   ''                                            )
declare -ar   PANEL_PLUGIN_TRASH_APPLET=(                   'thunar-tpa'         ''                   ''                                            )
declare -ar   PANEL_PLUGIN_WEATHER_UPDATE=(                 'weather'            'PluginResources'    'WEATHER_PLUGIN_RESOURCES'                    )
declare -ar   PANEL_PLUGIN_WHISKER_MENU=(                   'whiskermenu'        'PluginResources'    ''                                            )
declare -ar   PANEL_PLUGIN_WINDOW_BUTTONS=(                 'tasklist'           'PluginProperties'   'WINDOW_BUTTONS_PLUGIN_PROPERTIES'            )
declare -ar   PANEL_PLUGIN_WINDOW_MENU=(                    'windowmenu'         'PluginProperties'   'WINDOW_MENU_PLUGIN_PROPERTIES'               )
declare -ar   PANEL_PLUGIN_WORKSPACE_SWITCHER=(             'pager'              'PluginProperties'   'WORKSPACE_SWITCHER_PLUGIN_PROPERTIES'        )


declare -ar   ACTION_BUTTONS_PLUGIN_PROPERTIES=(
                                                          'ACTION_BUTTONS_APPEARANCE'
                                                          'ACTION_BUTTONS_ASK_CONFIRMATION'
                                                          'ACTION_BUTTONS_INVERT_ORIENTATION'
                                                          'ACTION_BUTTONS_ITEMS'
              )
declare -ar   APPLICATIONS_MENU_PLUGIN_PROPERTIES=(
                                                          'APPLICATIONS_MENU_BUTTON_ICON'
                                                          'APPLICATIONS_MENU_BUTTON_TITLE'
                                                          'APPLICATIONS_MENU_CUSTOM_MENU'
                                                          'APPLICATIONS_MENU_CUSTOM_MENU_FILE'
                                                          'APPLICATIONS_MENU_SHOW_BUTTON_TITLE'
                                                          'APPLICATIONS_MENU_SHOW_GENERIC_NAMES'
                                                          'APPLICATIONS_MENU_SHOW_MENU_ICONS'
                                                          'APPLICATIONS_MENU_SHOW_TOOLTIPS'
              )
declare -ar   CLOCK_PLUGIN_PROPERTIES=(
                                                          'CLOCK_DIGITAL_FORMAT'
                                                          'CLOCK_FLASH_SEPARATORS'
                                                          'CLOCK_FUZZINESS'
                                                          'CLOCK_MODE'
                                                          'CLOCK_SHOW_GRID'
                                                          'CLOCK_SHOW_INACTIVE'
                                                          'CLOCK_SHOW_MERIDIEM'
                                                          'CLOCK_SHOW_MILITARY'
                                                          'CLOCK_SHOW_SECONDS'
                                                          'CLOCK_TIMEZONE'
                                                          'CLOCK_TOOLTIP_FORMAT'
                                                          'CLOCK_TRUE_BINARY'
              )
declare -ar   DIRECTORY_MENU_PLUGIN_PROPERTIES=(
                                                          'DIRECTORY_MENU_BASE_DIRECTORY'
                                                          'DIRECTORY_MENU_FILE_PATTERN'
                                                          'DIRECTORY_MENU_HIDDEN_FILES'
                                                          'DIRECTORY_MENU_ICON_NAME'
              )
declare -ar   NOTIFICATION_AREA_PLUGIN_PROPERTIES=(
                                                          'NOTIFICATION_AREA_NAMES_VISIBLE'
                                                          'NOTIFICATION_AREA_SHOW_FRAME'
                                                          'NOTIFICATION_AREA_SIZE_MAX'
              )
declare -ar   PLACES_PLUGIN_PROPERTIES=(
                                                          'PLACES_BUTTON_LABEL'
                                                          'PLACES_MOUNT_OPEN_VOLUMES'
                                                          'PLACES_SEARCH_CMD'
                                                          'PLACES_SHOW_BOOKMARKS'
                                                          'PLACES_SHOW_BUTTON_TYPE'
                                                          'PLACES_SHOW_ICONS'
                                                          'PLACES_SHOW_RECENT'
                                                          'PLACES_SHOW_RECENT_CLEAR'
                                                          'PLACES_SHOW_VOLUMES'
              )
declare -ar   PULSEAUDIO_PLUGIN_PROPERTIES=(
                                                          'PULSEAUDIO_ENABLE_KEYBOARD_SHORTCUTS'
                                                          'PULSEAUDIO_MIXER_COMMAND'
                                                          'PULSEAUDIO_SHOW_NOTIFICATIONS'
              )
declare -ar   SEPARATOR_DOTS_PLUGIN_PROPERTIES=(
                                                          'SEPARATOR_EXPAND_NO'
                                                          'SEPARATOR_STYLE_DOTS'
              )
declare -ar   SEPARATOR_EXPANDING_PLUGIN_PROPERTIES=(
                                                          'SEPARATOR_EXPAND_ON'
                                                          'SEPARATOR_STYLE_TRANSPARENT'
              )
declare -ar   SEPARATOR_TRANSPARENT_PLUGIN_PROPERTIES=(
                                                          'SEPARATOR_EXPAND_NO'
                                                          'SEPARATOR_STYLE_TRANSPARENT'
              )
declare -ar   WINDOW_BUTTONS_PLUGIN_PROPERTIES=(
                                                          'WINDOW_BUTTONS_FLAT_BUTTONS'
                                                          'WINDOW_BUTTONS_GROUPING'
                                                          'WINDOW_BUTTONS_INCLUDE_ALL_MONITORS'
                                                          'WINDOW_BUTTONS_INCLUDE_ALL_WORKSPACES'
                                                          'WINDOW_BUTTONS_MIDDLE_CLICK'
                                                          'WINDOW_BUTTONS_SHOW_HANDLE'
                                                          'WINDOW_BUTTONS_SHOW_LABELS'
                                                          'WINDOW_BUTTONS_SHOW_ONLY_MINIMIZED'
                                                          'WINDOW_BUTTONS_SHOW_WIREFRAMES'
                                                          'WINDOW_BUTTONS_SORT_ORDER'
                                                          'WINDOW_BUTTONS_SWITCH_WORKSPACE_ON_UNMINIMIZE'
                                                          'WINDOW_BUTTONS_WINDOW_SCROLLING'
              )
declare -ar   WINDOW_MENU_PLUGIN_PROPERTIES=(
                                                          'WINDOW_MENU_ALL_WORKSPACES'
                                                          'WINDOW_MENU_STYLE'
                                                          'WINDOW_MENU_URGENCY_NOTIFICATION'
                                                          'WINDOW_MENU_WORKSPACE_ACTIONS'
                                                          'WINDOW_MENU_WORKSPACE_NAMES'
              )
declare -ar   WORKSPACE_SWITCHER_PLUGIN_PROPERTIES=(
                                                          'WORKSPACE_SWITCHER_ROWS'
                                                          'WORKSPACE_SWITCHER_WORKSPACE_SCROLLING'
              )


declare -ar   ACTION_BUTTONS_APPEARANCE=(                       'appearance'                       'int'      '0'                                                )
declare -ar   ACTION_BUTTONS_ASK_CONFIRMATION=(                 'ask-confirmation'                 'bool'     'true'                                             )
declare -ar   ACTION_BUTTONS_INVERT_ORIENTATION=(               'invert-orientation'               'bool'     'false'                                            )
declare -ar   ACTION_BUTTONS_ITEMS=(                            'items'                            'array'    'ACTION_BUTTONS_ITEMS_ARRAY'                       )


declare -ar   APPLICATIONS_MENU_BUTTON_ICON=(                   'button-icon'                      'string'   'debian-swirl'                                     )
declare -ar   APPLICATIONS_MENU_BUTTON_TITLE=(                  'button-title'                     'string'   'Applications'                                     )
declare -ar   APPLICATIONS_MENU_CUSTOM_MENU=(                   'custom-menu'                      'bool'     'false'                                            )
declare -ar   APPLICATIONS_MENU_CUSTOM_MENU_FILE=(              'custom-menu-file'                 'string'   ''                                                 )
declare -ar   APPLICATIONS_MENU_SHOW_BUTTON_TITLE=(             'show-button-title'                'bool'     'true'                                             )
declare -ar   APPLICATIONS_MENU_SHOW_GENERIC_NAMES=(            'show-generic-names'               'bool'     'false'                                            )
declare -ar   APPLICATIONS_MENU_SHOW_MENU_ICONS=(               'show-menu-icons'                  'bool'     'true'                                             )
declare -ar   APPLICATIONS_MENU_SHOW_TOOLTIPS=(                 'show-tooltips'                    'bool'     'true'                                             )


declare -ar   CLOCK_DIGITAL_FORMAT=(                            'digital-format'                   'string'   '%a %F %R'                                         )
declare -ar   CLOCK_FLASH_SEPARATORS=(                          'flash-separators'                 'bool'     'false'                                            )
declare -ar   CLOCK_FUZZINESS=(                                 'fuzziness'                        'int'      ''                                                 )
declare -ar   CLOCK_MODE=(                                      'mode'                             'int'      '2'                                                )
declare -ar   CLOCK_SHOW_GRID=(                                 'show-grid'                        'bool'     ''                                                 )
declare -ar   CLOCK_SHOW_INACTIVE=(                             'show-inactive'                    'bool'     ''                                                 )
declare -ar   CLOCK_SHOW_MERIDIEM=(                             'show-meridiem'                    'bool'     ''                                                 )
declare -ar   CLOCK_SHOW_MILITARY=(                             'show-military'                    'bool'     ''                                                 )
declare -ar   CLOCK_SHOW_SECONDS=(                              'show-seconds'                     'bool'     ''                                                 )
declare -ar   CLOCK_TIMEZONE=(                                  'timezone'                         'string'   ''                                                 )
declare -ar   CLOCK_TOOLTIP_FORMAT=(                            'tooltip-format'                   'string'   '%A, %-d %B %Y%t%T %Z (%z)%nDay %Y.%j%nWeek %G.%V' )
declare -ar   CLOCK_TRUE_BINARY=(                               'true-binary'                      'bool'     ''                                                 )


declare -ar   DIRECTORY_MENU_BASE_DIRECTORY=(                   'base-directory'                   'string'   "${HOME}"                                          )
declare -ar   DIRECTORY_MENU_FILE_PATTERN=(                     'file-pattern'                     'string'   ''                                                 )
declare -ar   DIRECTORY_MENU_HIDDEN_FILES=(                     'hidden-files'                     'bool'     'false'                                            )
declare -ar   DIRECTORY_MENU_ICON_NAME=(                        'icon-name'                        'string'   'user-home'                                        )


declare -ar   NOTIFICATION_AREA_NAMES_VISIBLE=(                 'names-visible'                    'array'    ''                                                 )
declare -ar   NOTIFICATION_AREA_SHOW_FRAME=(                    'show-frame'                       'bool'     'false'                                            )
declare -ar   NOTIFICATION_AREA_SIZE_MAX=(                      'size-max'                         'int'      '22'                                               )

declare -ar   PLACES_BUTTON_LABEL=(                             'button-label'                     'string'   'Places'                                           )
declare -ar   PLACES_MOUNT_OPEN_VOLUMES=(                       'mount-open-volumes'               'bool'     'false'                                            )
declare -ar   PLACES_SEARCH_CMD=(                               'search-cmd'                       'string'   ''                                                 )
declare -ar   PLACES_SHOW_BOOKMARKS=(                           'show-bookmarks'                   'bool'     'true'                                             )
declare -ar   PLACES_SHOW_BUTTON_TYPE=(                         'show-button-type'                 'int'      '2'                                                )
declare -ar   PLACES_SHOW_ICONS=(                               'show-icons'                       'bool'     'true'                                             )
declare -ar   PLACES_SHOW_RECENT=(                              'show-recent'                      'bool'     'true'                                             )
declare -ar   PLACES_SHOW_RECENT_CLEAR=(                        'show-recent-clear'                'bool'     'true'                                             )
declare -ar   PLACES_SHOW_VOLUMES=(                             'show-volumes'                     'bool'     'true'                                             )


declare -ar   PULSEAUDIO_ENABLE_KEYBOARD_SHORTCUTS=(            'enable-keyboard-shortcuts'        'bool'     'true'                                             )
declare -ar   PULSEAUDIO_MIXER_COMMAND=(                        'mixer-command'                    'string'   'pavucontrol'                                      )
declare -ar   PULSEAUDIO_SHOW_NOTIFICATIONS=(                   'show-notifications'               'bool'     'true'                                             )


declare -ar   SEPARATOR_EXPAND_NO=(                             'expand'                           'bool'     'false'                                            )
declare -ar   SEPARATOR_EXPAND_ON=(                             'expand'                           'bool'     'true'                                             )
declare -ar   SEPARATOR_STYLE_TRANSPARENT=(                     'style'                            'int'      '0'                                                )
declare -ar   SEPARATOR_STYLE_DOTS=(                            'style'                            'int'      '3'                                                )


declare -ar   WINDOW_BUTTONS_FLAT_BUTTONS=(                     'flat-buttons'                     'bool'     'false'                                            )
declare -ar   WINDOW_BUTTONS_GROUPING=(                         'grouping'                         'int'      '0'                                                )
declare -ar   WINDOW_BUTTONS_INCLUDE_ALL_MONITORS=(             'include-all-monitors'             'bool'     'true'                                             )
declare -ar   WINDOW_BUTTONS_INCLUDE_ALL_WORKSPACES=(           'include-all-workspaces'           'bool'     'false'                                            )
declare -ar   WINDOW_BUTTONS_MIDDLE_CLICK=(                     'middle-click'                     'int'      '0'                                                )
declare -ar   WINDOW_BUTTONS_SHOW_HANDLE=(                      'show-handle'                      'bool'     'false'                                            )
declare -ar   WINDOW_BUTTONS_SHOW_LABELS=(                      'show-labels'                      'bool'     'true'                                             )
declare -ar   WINDOW_BUTTONS_SHOW_ONLY_MINIMIZED=(              'show-only-minimized'              'bool'     'false'                                            )
declare -ar   WINDOW_BUTTONS_SHOW_WIREFRAMES=(                  'show-wireframes'                  'bool'     'false'                                            )
declare -ar   WINDOW_BUTTONS_SORT_ORDER=(                       'sort-order'                       'int'      '4'                                                )
declare -ar   WINDOW_BUTTONS_SWITCH_WORKSPACE_ON_UNMINIMIZE=(   'switch-workspace-on-unminimize'   'bool'     'true'                                             )
declare -ar   WINDOW_BUTTONS_WINDOW_SCROLLING=(                 'window-scrolling'                 'bool'     'false'                                            )


declare -ar   WINDOW_MENU_ALL_WORKSPACES=(                      'all-workspaces'                   'bool'     'true'                                             )
declare -ar   WINDOW_MENU_STYLE=(                               'style'                            'int'      '1'                                                )
declare -ar   WINDOW_MENU_URGENCY_NOTIFICATION=(                'urgentcy-notification'            'bool'     'true'                                             )
declare -ar   WINDOW_MENU_WORKSPACE_ACTIONS=(                   'workspace-actions'                'bool'     'false'                                            )
declare -ar   WINDOW_MENU_WORKSPACE_NAMES=(                     'workspace-names'                  'bool'     'true'                                             )


declare -ar   WORKSPACE_SWITCHER_ROWS=(                         'rows'                             'int'      '1'                                                )
declare -ar   WORKSPACE_SWITCHER_WORKSPACE_SCROLLING=(          'workspace-scrolling'              'bool'     'false'                                            )


declare -ar   ACTION_BUTTONS_ITEMS_ARRAY=(   'string'
                                             '+lock-screen'   '+logout-dialog'   '+restart'       '+shutdown'    '+logout'
                                             '-hibernate'     '-suspend'         '-switch-user'   '-separator'   '-separator'   '-separator'   )


declare -r    BATTERY_PLUGIN_RESOURCES="$(cat <<-'//*EOF_QUOTED'
	display_label=false
	display_icon=false
	display_power=false
	display_percentage=true
	display_bar=true
	display_time=false
	tooltip_display_percentage=true
	tooltip_display_time=true
	low_percentage=10
	critical_percentage=5
	action_on_low=1
	action_on_critical=1
	hide_when_full=0
	colorA=#8888FF
	colorH=#00FF00
	colorL=#FFFF00
	colorC=#FF0000
	command_on_low=
	command_on_critical=
	//*EOF_QUOTED
)"


declare -r    CPU_GRAPH_PLUGIN_RESOURCES="$(cat <<-'//*EOF_QUOTED'
	UpdateInterval=3
	TimeScale=0
	Size=32
	Mode=0
	Frame=0
	Border=0
	Bars=1
	TrackedCore=0
	Command=xfce4-taskmanager
	InTerminal=0
	StartupNotification=1
	ColorMode=0
	Foreground1=#0000ffff0000
	Foreground2=#ffff00000000
	Foreground3=#00000000ffff
	Background=#444444444444
	//*EOF_QUOTED
)"


declare -r    NETWORK_MONITOR_PLUGIN_TEMPLATE_RC="$(cat <<-'//*EOF_QUOTED'
	Use_Label=false
	Show_Values=false
	Show_Bars=true
	Colorize_Values=false
	Color_In=#FF4F00
	Color_Out=#FFE500
	Text=
	Network_Device=
	Max_In=4096
	Max_Out=4096
	Auto_Max=true
	Update_Interval=1000
	Values_As_Bits=false
	//*EOF_QUOTED
)"
declare       NETWORK_MONITOR_PLUGIN_RESOURCES


declare -r    WEATHER_PLUGIN_RESOURCES="$(cat <<-'//*EOF_QUOTED'
	loc_name=Antwerpen, Vlaanderen
	lat=51.248329
	lon=4.757375
	msl=18
	timezone=Europe/Brussels
	cache_file_max_age=172800
	power_saving=true
	units_temperature=0
	units_pressure=0
	units_windspeed=0
	units_precipitation=0
	units_altitude=0
	model_apparent_temperature=0
	round=true
	single_row=true
	tooltip_style=1
	forecast_layout=1
	forecast_days=5
	scrollbox_animate=false
	theme_dir=/usr/share/xfce4/weather/icons/liquid
	show_scrollbox=true
	scrollbox_lines=1
	scrollbox_color=#000000000000
	scrollbox_use_color=false
	label0=3
	//*EOF_QUOTED
)"


declare -ar   LAUNCHER_HOSTS_FILE_VIEWER_PLUGIN_SETUP=(     'LAUNCHER_HOSTS_FILE_VIEWER_PLUGIN_PROPERTIES'     'LAUNCHER_HOSTS_FILE_VIEWER_PLUGIN_ITEMS'     )
declare -ar   LAUNCHER_LIBREOFFICE_SETUP=(                  'LAUNCHER_LIBREOFFICE_PLUGIN_PROPERTIES'           'LAUNCHER_LIBREOFFICE_PLUGIN_ITEMS'           )
declare -ar   LAUNCHER_LIBREOFFICE_BASE_PLUGIN_SETUP=(      'LAUNCHER_LIBREOFFICE_BASE_PLUGIN_PROPERTIES'      'LAUNCHER_LIBREOFFICE_BASE_PLUGIN_ITEMS'      )
declare -ar   LAUNCHER_LIBREOFFICE_CALC_PLUGIN_SETUP=(      'LAUNCHER_LIBREOFFICE_CALC_PLUGIN_PROPERTIES'      'LAUNCHER_LIBREOFFICE_CALC_PLUGIN_ITEMS'      )
declare -ar   LAUNCHER_LIBREOFFICE_DRAW_PLUGIN_SETUP=(      'LAUNCHER_LIBREOFFICE_DRAW_PLUGIN_PROPERTIES'      'LAUNCHER_LIBREOFFICE_DRAW_PLUGIN_ITEMS'      )
declare -ar   LAUNCHER_LIBREOFFICE_IMPRESS_PLUGIN_SETUP=(   'LAUNCHER_LIBREOFFICE_IMPRESS_PLUGIN_PROPERTIES'   'LAUNCHER_LIBREOFFICE_IMPRESS_PLUGIN_ITEMS'   )
declare -ar   LAUNCHER_LIBREOFFICE_MATH_PLUGIN_SETUP=(      'LAUNCHER_LIBREOFFICE_MATH_PLUGIN_PROPERTIES'      'LAUNCHER_LIBREOFFICE_MATH_PLUGIN_ITEMS'      )
declare -ar   LAUNCHER_LIBREOFFICE_WRITER_PLUGIN_SETUP=(    'LAUNCHER_LIBREOFFICE_WRITER_PLUGIN_PROPERTIES'    'LAUNCHER_LIBREOFFICE_WRITER_PLUGIN_ITEMS'    )
declare -ar   LAUNCHER_WEB_BROWSER_PLUGIN_SETUP=(           'LAUNCHER_WEB_BROWSER_PLUGIN_PROPERTIES'           'LAUNCHER_WEB_BROWSER_PLUGIN_ITEMS'           )


declare -ar   LAUNCHER_PROPERTIES_UNSET=(
                                            'LAUNCHER_ARROW_POSITION_UNSET'
                                            'LAUNCHER_DISABLE_TOOLTIPS_UNSET'
                                            'LAUNCHER_MOVE_FIRST_UNSET'
                                            'LAUNCHER_SHOW_LABEL_UNSET'
              )


declare -ar   LAUNCHER_ARROW_POSITION_UNSET=(     'arrow-position'     'int'      ''   )
declare -ar   LAUNCHER_DISABLE_TOOLTIPS_UNSET=(   'disable-tooltips'   'bool'     ''   )
declare -ar   LAUNCHER_MOVE_FIRST_UNSET=(         'move-first'         'bool'     ''   )
declare -ar   LAUNCHER_SHOW_LABEL_UNSET=(         'show-label'         'bool'     ''   )


declare -nr   LAUNCHER_HOSTS_FILE_VIEWER_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'
declare -nr   LAUNCHER_LIBREOFFICE_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'
declare -nr   LAUNCHER_LIBREOFFICE_BASE_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'
declare -nr   LAUNCHER_LIBREOFFICE_CALC_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'
declare -nr   LAUNCHER_LIBREOFFICE_DRAW_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'
declare -nr   LAUNCHER_LIBREOFFICE_IMPRESS_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'
declare -nr   LAUNCHER_LIBREOFFICE_MATH_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'
declare -nr   LAUNCHER_LIBREOFFICE_WRITER_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'
declare -nr   LAUNCHER_WEB_BROWSER_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'


declare -ar   LAUNCHER_HOSTS_FILE_VIEWER_PLUGIN_ITEMS=(     'LAUNCHER_HOSTS_FILE_VIEWER_ITEM'     )
declare -ar   LAUNCHER_LIBREOFFICE_PLUGIN_ITEMS=(
                                                            'LAUNCHER_LIBREOFFICE_ITEM'
                                                            'LAUNCHER_LIBREOFFICE_BASE_ITEM'
                                                            'LAUNCHER_LIBREOFFICE_CALC_ITEM'
                                                            'LAUNCHER_LIBREOFFICE_DRAW_ITEM'
                                                            'LAUNCHER_LIBREOFFICE_IMPRESS_ITEM'
                                                            'LAUNCHER_LIBREOFFICE_MATH_ITEM'
                                                            'LAUNCHER_LIBREOFFICE_WRITER_ITEM'
              )                                                            
declare -ar   LAUNCHER_LIBREOFFICE_BASE_PLUGIN_ITEMS=(      'LAUNCHER_LIBREOFFICE_BASE_ITEM'      )
declare -ar   LAUNCHER_LIBREOFFICE_CALC_PLUGIN_ITEMS=(      'LAUNCHER_LIBREOFFICE_CALC_ITEM'      )
declare -ar   LAUNCHER_LIBREOFFICE_DRAW_PLUGIN_ITEMS=(      'LAUNCHER_LIBREOFFICE_DRAW_ITEM'      )
declare -ar   LAUNCHER_LIBREOFFICE_IMPRESS_PLUGIN_ITEMS=(   'LAUNCHER_LIBREOFFICE_IMPRESS_ITEM'   )
declare -ar   LAUNCHER_LIBREOFFICE_MATH_PLUGIN_ITEMS=(      'LAUNCHER_LIBREOFFICE_MATH_ITEM'      )
declare -ar   LAUNCHER_LIBREOFFICE_WRITER_PLUGIN_ITEMS=(    'LAUNCHER_LIBREOFFICE_WRITER_ITEM'    )
declare -ar   LAUNCHER_WEB_BROWSER_PLUGIN_ITEMS=(           'LAUNCHER_WEB_BROWSER_ITEM'           )


declare -ar   LAUNCHER_HOSTS_FILE_VIEWER_ITEM=(     'LauncherSourceString'   'LAUNCHER_HOSTS_FILE_VIEWER_SOURCE_STRING'                  )
declare -ar   LAUNCHER_LIBREOFFICE_ITEM=(           'LauncherSourceFile'     '/usr/share/applications/libreoffice-startcenter.desktop'   )
declare -ar   LAUNCHER_LIBREOFFICE_BASE_ITEM=(      'LauncherSourceFile'     '/usr/share/applications/libreoffice-base.desktop'          )
declare -ar   LAUNCHER_LIBREOFFICE_CALC_ITEM=(      'LauncherSourceFile'     '/usr/share/applications/libreoffice-calc.desktop'          )
declare -ar   LAUNCHER_LIBREOFFICE_DRAW_ITEM=(      'LauncherSourceFile'     '/usr/share/applications/libreoffice-draw.desktop'          )
declare -ar   LAUNCHER_LIBREOFFICE_IMPRESS_ITEM=(   'LauncherSourceFile'     '/usr/share/applications/libreoffice-impress.desktop'       )
declare -ar   LAUNCHER_LIBREOFFICE_MATH_ITEM=(      'LauncherSourceFile'     '/usr/share/applications/libreoffice-math.desktop'          )
declare -ar   LAUNCHER_LIBREOFFICE_WRITER_ITEM=(    'LauncherSourceFile'     '/usr/share/applications/libreoffice-writer.desktop'        )
declare -ar   LAUNCHER_WEB_BROWSER_ITEM=(           'LauncherSourceFile'     '/usr/share/applications/exo-web-browser.desktop'           )


declare -r    LAUNCHER_HOSTS_FILE_VIEWER_SOURCE_STRING="$(cat <<-'//*EOF_QUOTED'
	[Desktop Entry]
	Version=1.0
	Type=Application
	Name=Hosts File Viewer
	Comment=View the /etc/hosts configuration file
	Exec=whiptail --scrolltext --textbox /etc/hosts 20 72
	Icon=text-x-preview
	//*EOF_QUOTED
)
$(cat <<-//*EOF_UNQUOTED
	Path=${HOME}
	//*EOF_UNQUOTED
)
$(cat <<-'//*EOF_QUOTED'
	Terminal=true
	StartupNotify=false
	//*EOF_QUOTED
)"


declare -r    PERL_GENERATE_XFCE_DESKTOP_FILE="$(cat <<-'//*EOF_QUOTED'
	#!/usr/bin/perl

	use Glib ;

	$x_xfce_source = $ARGV [ 0 ] ;
	$x_xfce_dest   = $ARGV [ 1 ] ;

	$keyfile =  Glib::KeyFile -> new ;
	$keyfile -> load_from_file ( $x_xfce_source , 'G_KEY_FILE_NONE' ) ;
	$keyfile -> set_string     ( 'Desktop Entry', 'X-XFCE-Source'   , Glib -> filename_to_uri ( $x_xfce_source , undef ) ) ;

	open  OUTPUT_FILE , '>' . $x_xfce_dest   or   exit (  4 ) ;
	print OUTPUT_FILE $keyfile -> to_data  ;
	close OUTPUT_FILE ;
	//*EOF_QUOTED
)"


declare -i    PANEL_COUNT=0
declare       PANEL_XFCONF_PATH
declare -i    PANEL_FIRST_PLUGIN


declare -i    PLUGIN_COUNT=0
declare       PLUGIN_XFCONF_PATH


declare -a    LAUNCHER_ITEMS
declare       LAUNCHER_ITEMS_DESKTOP_DIRECTORY_PATH
declare -i    LAUNCHER_ITEM_DESKTOP_FILENAME_HI="$(date +'%s')"
declare -i    LAUNCHER_ITEM_DESKTOP_FILENAME_LO='0'
declare       LAUNCHER_ITEM_DESKTOP_FILENAME
declare       LAUNCHER_ITEM_DESKTOP_FILE_FULL_PATH


function xfce_restart_panel_instance ( )

   {

      echo 'NOTE: Restarting the XFCE panel instance.'
      xfce4-panel --restart
      sleep 1

   }


function xfce_open_panel ( )

   {

      PANEL_XFCONF_PATH='/panels/panel-'"$(( ++ PANEL_COUNT ))"
      PANEL_FIRST_PLUGIN="$(( PLUGIN_COUNT + 1 ))"
      echo '      This is panel number '"${PANEL_COUNT}"', property hierarchy '"'${PANEL_XFCONF_PATH}'"'.'

   }


function xfce_close_panel ( )

   {

      xfconf-query --channel 'xfce4-panel' --property '/panels' --create --force-array $(seq --format='--type int --set %.0f' --separator=' ' ${PANEL_COUNT})
      xfce_restart_panel_instance

   }


function xfce_open_panel_plugin ( )

   {

      local   PLUGIN_NAME="${1}"


      PLUGIN_XFCONF_PATH='/plugins/plugin-'"$(( ++ PLUGIN_COUNT ))"
      xfconf-query --channel 'xfce4-panel' --property "${PLUGIN_XFCONF_PATH}" --create --type 'string' --set "${PLUGIN_NAME}"
      echo '      This is plugin number '"${PLUGIN_COUNT}"', property hierarchy '"'${PLUGIN_XFCONF_PATH}'"', value '"'${PLUGIN_NAME}'"'.'

   }


function xfce_close_panel_plugin ( )

   {

      xfconf-query --channel 'xfce4-panel' --property "${PANEL_XFCONF_PATH}"'/plugin-ids' --create --force-array $(seq --format '--type int --set %.0f' --separator=' ' ${PANEL_FIRST_PLUGIN} ${PLUGIN_COUNT})

   }


function xfce_open_launcher_plugin ( )

   {

      LAUNCHER_ITEMS=( )
      LAUNCHER_ITEMS_DESKTOP_DIRECTORY_PATH="${XFCE_PANEL_DIRECTORY}"'/launcher-'"${PLUGIN_COUNT}"
      mkdir --verbose "${LAUNCHER_ITEMS_DESKTOP_DIRECTORY_PATH}"

   }


function xfce_close_launcher_plugin ( )

   {

      :

   }


function xfce_open_launcher_item ( )

   {

      LAUNCHER_ITEM_DESKTOP_FILENAME="$(( ++ LAUNCHER_ITEM_DESKTOP_FILENAME_HI ))$(( ++ LAUNCHER_ITEM_DESKTOP_FILENAME_LO ))"'.desktop'
      LAUNCHER_ITEM_DESKTOP_FILE_FULL_PATH="${LAUNCHER_ITEMS_DESKTOP_DIRECTORY_PATH}"'/'"${LAUNCHER_ITEM_DESKTOP_FILENAME}"
      LAUNCHER_ITEMS+=( "${LAUNCHER_ITEM_DESKTOP_FILENAME}" )

   }


function xfce_close_launcher_item ( )

   {

      xfconf-query --channel 'xfce4-panel' --property "${PLUGIN_XFCONF_PATH}"'/items' --create --force-array$(printf ' --type string --set %s' "${LAUNCHER_ITEMS[@]}")

   }


function xfce_set_plugin_property ( )

   {

      local -nr __PLUGIN_PROPERTY__="${1}"
      local -r    PROPERTY_NAME="${__PLUGIN_PROPERTY__[0]}"
      local -r    PROPERTY_TYPE="${__PLUGIN_PROPERTY__[1]}"
      local -r    PROPERTY_VALUE="${__PLUGIN_PROPERTY__[2]}"


      if [ -n "${PROPERTY_TYPE}" ] && [ -n "${PROPERTY_VALUE}" ]
      then
         if [ "${PROPERTY_TYPE}" == 'array' ]
         then
            {

               local -nr __VALUE_ARRAY__="${PROPERTY_VALUE}"


               echo 'NOTE: Setting plugin property '"'${PROPERTY_NAME}'"' of type '"'${__VALUE_ARRAY__[0]}'"' array to value ('"$(printf " '%s'" "${__VALUE_ARRAY__[@]:1}")"' ).'
               xfconf-query --channel 'xfce4-panel' --property "${PLUGIN_XFCONF_PATH}"'/'"${PROPERTY_NAME}" --create --force-array$(printf ' --type '"${__VALUE_ARRAY__[0]}"' --set %s' "${__VALUE_ARRAY__[@]:1}")

            }
         else
            echo 'NOTE: Setting plugin property '"'${PROPERTY_NAME}'"' of type '"'${PROPERTY_TYPE}'"' to value '"'${PROPERTY_VALUE}'"'.'
            xfconf-query --channel 'xfce4-panel' --property "${PLUGIN_XFCONF_PATH}"'/'"${PROPERTY_NAME}" --create --type "${PROPERTY_TYPE}" --set "${PROPERTY_VALUE}"
         fi
      else
         echo 'NOTE: Clearing plugin property '"'${PROPERTY_NAME}'"'.'
         xfconf-query --channel 'xfce4-panel' --property "${PLUGIN_XFCONF_PATH}"'/'"${PROPERTY_NAME}" --reset
      fi

   }


function xfce_set_plugin_properties ( )

   {

      local -nr __PLUGIN_PROPERTIES__="${1}"
      local       PLUGIN_PROPERTY


      for PLUGIN_PROPERTY in "${__PLUGIN_PROPERTIES__[@]}"
      do
         xfce_set_plugin_property "${PLUGIN_PROPERTY}"
      done

   }


function xfce_set_plugin_resources ( )

   {

      local -r    PLUGIN_NAME="${1}"
      local -nr   PLUGIN_RESOURCES="${2}"
      local -r    RESOURCE_FILE="${XFCE_PANEL_DIRECTORY}"'/'"${PLUGIN_NAME}"'-'"${PLUGIN_COUNT}"'.rc'


      echo 'NOTE: Saving plugin configuration to resource file '"'${RESOURCE_FILE}'"'.'
      echo "${PLUGIN_RESOURCES}" > "${RESOURCE_FILE}"

   }


function xfce_setup_launcher_item ( )

   {

      local -nr __LAUNCHER_ITEM__="${1}"
      local -r    ITEM_TYPE="${__LAUNCHER_ITEM__[0]}"
      local -r    ITEM_VALUE="${__LAUNCHER_ITEM__[1]}"


      echo 'NOTE: Creating launcher item '"'${1}'"'.'
      xfce_open_launcher_item
      case "${ITEM_TYPE}" in

         'LauncherSourceFile' )

            echo '      Launcher item configuration source file is '"'${ITEM_VALUE}'"'.'
            echo '      Saving launcher item configuration to file '"'${LAUNCHER_ITEM_DESKTOP_FILE_FULL_PATH}'"'.'
            perl -e "${PERL_GENERATE_XFCE_DESKTOP_FILE}" "${ITEM_VALUE}" "${LAUNCHER_ITEM_DESKTOP_FILE_FULL_PATH}"

         ;;

         'LauncherSourceString' )

            {

               local -nr   LAUNCHER_ITEM_DESKTOP_CONTENTS="${ITEM_VALUE}"


               echo '      Saving launcher item configuration to file '"'${LAUNCHER_ITEM_DESKTOP_FILE_FULL_PATH}'"'.'
               echo "${LAUNCHER_ITEM_DESKTOP_CONTENTS}" > "${LAUNCHER_ITEM_DESKTOP_FILE_FULL_PATH}"

            }

         ;;

      esac
      xfce_close_launcher_item

   }


function xfce_setup_launcher_items ( )

   {

      local -nr __LAUNCHER_ITEMS__="${1}"
      local       LAUNCHER_ITEM


      echo 'NOTE: Processing launcher item set '"'${1}'"'.'
      for LAUNCHER_ITEM in "${__LAUNCHER_ITEMS__[@]}"
      do
         xfce_setup_launcher_item "${LAUNCHER_ITEM}"
      done

   }


function xfce_setup_launcher_plugin ( )

   {

      local -nr __PLUGIN_SETUP__="${1}"
      local -r    PLUGIN_PROPERTIES="${__PLUGIN_SETUP__[0]}"
      local -r    PLUGIN_ITEMS="${__PLUGIN_SETUP__[1]}"


      xfce_open_launcher_plugin
      xfce_set_plugin_properties "${PLUGIN_PROPERTIES}"
      xfce_setup_launcher_items  "${PLUGIN_ITEMS}"
      xfce_close_launcher_plugin

   }


function xfce_create_panel_plugin ( )

   {

      local -nr __PANEL_PLUGIN__="${1}"
      local -r    PLUGIN_NAME="${__PANEL_PLUGIN__[0]}"
      local -r    PLUGIN_CONFTYPE="${__PANEL_PLUGIN__[1]}"
      local -r    PLUGIN_CONF="${__PANEL_PLUGIN__[2]}"


      if [ "${PLUGIN_CONFTYPE}" == 'PluginNetLoad' ]
      then
         {

            local       IP_LINK
            local -nr __CONFIG_TEMPLATE__="${PLUGIN_CONF}"
            local -r    CONFIG_NAME="${PLUGIN_CONF%TEMPLATE_RC}"'RESOURCES'
            local -n  __CONFIG__="${CONFIG_NAME}"


            for IP_LINK in "${IP_LINKS[@]}"
            do
               echo 'NOTE: Creating panel plugin '"'${1}'"' for '"'"'Network_Device='"${IP_LINK}'"'.'
               xfce_open_panel_plugin "${PLUGIN_NAME}"
               __CONFIG__="$(sed --regexp-extended --expression='s/(Network_Device=)$/\1'"${IP_LINK}"'/' <<< "${__CONFIG_TEMPLATE__}")"
               xfce_set_plugin_resources "${PLUGIN_NAME}" "${CONFIG_NAME}"
               xfce_close_panel_plugin
            done

         }
      else
         echo 'NOTE: Creating panel plugin '"'${1}'"'.'
         xfce_open_panel_plugin "${PLUGIN_NAME}"
         [ -z "${PLUGIN_CONFTYPE}" ]   ||
         [ -z "${PLUGIN_CONF}"     ]   ||
         case "${PLUGIN_CONFTYPE}" in

            'PluginLauncher' )

               xfce_setup_launcher_plugin "${PLUGIN_CONF}"

            ;;

            'PluginProperties' )

               xfce_set_plugin_properties "${PLUGIN_CONF}"

            ;;

            'PluginResources' )

               if [ -n "${PLUGIN_CONF}" ]
               then
                  xfce_set_plugin_resources "${PLUGIN_NAME}" "${PLUGIN_CONF}"
               fi

            ;;

         esac
         xfce_close_panel_plugin
      fi

   }


function xfce_set_panel_property ( )

   {

      local -nr __PANEL_PROPERTY__="${1}"
      local -r    PROPERTY_NAME="${__PANEL_PROPERTY__[0]}"
      local -r    PROPERTY_TYPE="${__PANEL_PROPERTY__[1]}"
      local -r    PROPERTY_VALUE="${__PANEL_PROPERTY__[2]}"


      if [ -n "${PROPERTY_TYPE}" ] && [ -n "${PROPERTY_VALUE}" ]
      then
         echo 'NOTE: Setting panel property '"'${PROPERTY_NAME}'"' of type '"'${PROPERTY_TYPE}'"' to value '"'${PROPERTY_VALUE}'"'.'
         xfconf-query --channel 'xfce4-panel' --property "${PANEL_XFCONF_PATH}"'/'"${PROPERTY_NAME}" --create --type "${PROPERTY_TYPE}" --set "${PROPERTY_VALUE}"
      else
         echo 'NOTE: Clearing panel property '"'${PROPERTY_NAME}'"'.'
         xfconf-query --channel 'xfce4-panel' --property "${PANEL_XFCONF_PATH}"'/'"${PROPERTY_NAME}" --reset
      fi

   }


function xfce_set_panel_properties ( )

   {

      local -nr __PANEL_PROPERTIES__="${1}"
      local       PANEL_PROPERTY


      echo 'NOTE: Processing panel property set '"'${1}'"'.'
      for PANEL_PROPERTY in "${__PANEL_PROPERTIES__[@]}"
      do
         xfce_set_panel_property "${PANEL_PROPERTY}"
      done

   }


function xfce_create_panel ( )

   {

      local -nr __PANEL__="${1}"
      local -nr __PANEL_PROPERTY_SETS__="${__PANEL__[0]}"
      local -nr __PANEL_PLUGINS__="${__PANEL__[1]}"
      local       PANEL_PROPERTY_SET
      local       PANEL_PLUGIN


      echo 'NOTE: Creating panel '"'${1}'"'.'
      xfce_open_panel
      for PANEL_PROPERTY_SET in "${__PANEL_PROPERTY_SETS__[@]}"
      do
         xfce_set_panel_properties "${PANEL_PROPERTY_SET}"
      done
      for PANEL_PLUGIN in "${__PANEL_PLUGINS__[@]}"
      do
         xfce_create_panel_plugin "${PANEL_PLUGIN}"
      done
      xfce_close_panel

   }


function xfce_create_panels ( )

   {

      local -nr __PANELS__="${1}"
      local       PANEL


      for PANEL in "${__PANELS__[@]}"
      do
         xfce_create_panel "${PANEL}"
      done


   }


function xfce_clear_panels ( )

   {

      echo 'NOTE: Clearing the XFCE panels.'
      xfconf-query --channel 'xfce4-panel' --property '/panels' --reset  --recursive
      xfconf-query --channel 'xfce4-panel' --property '/panels' --create --force-array --type int --set 1
      xfce_restart_panel_instance
      xfconf-query --channel 'xfce4-panel' --property '/plugins' --reset --recursive
      rm --force --recursive --verbose "${XFCE_PANEL_DIRECTORY}"
      mkdir --parents --verbose "${XFCE_PANEL_DIRECTORY}"

   }


function desktop_is_xfce ( )

   {

      [ "${XDG_CURRENT_DESKTOP}" == 'XFCE' ]

   }


function system_is_debian ( )

   {

      [ "$(command lsb_release --id --short 2> /dev/null)" == 'Debian' ]

   }


#*****************************
#*                           *
#*  Bash Script Entry Point  *
#*                           *
#*****************************


{

   system_is_debian    &&   echo 'NOTE: This is a Debian system.'

}   &&
{

   desktop_is_xfce     &&   echo 'NOTE: The current desktop environment is XFCE.'

}   &&
{

   xfce_clear_panels   &&   xfce_create_panels 'XFCE_PANELS'

}

Last edited by luvr (2016-12-01 17:13:08)

Offline

#14 2016-10-13 22:51:43

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: how to make a script to modify xfce4 panel?

Great information, thanks.

Just would like to state that xfconf variables can be more than just bool, int, or string: uint is also supported (see https://forum.xfce.org/viewtopic.php?pid=43348#p43348. In addition, it would appear that the following types are also supported:

- uint64
- double

(source).

Since your post #12 is very detailed and useful, would you consider updating it to include this information?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#15 2016-10-14 13:26:36

luvr
Member
From: Boom ("Tomorrowland"), Belgium
Registered: 2016-09-25
Posts: 18

Re: how to make a script to modify xfce4 panel?

ToZ wrote:

Since your post #12 is very detailed and useful, would you consider updating it to include this information?

Done: Added 'uint', 'int64', 'uint64', and 'double' to the list of supported types.
Also included a paragraph about decimal, hexadecimal, and octal notation of integer values.

Offline

#16 2016-12-06 21:03:27

firms
Member
Registered: 2016-12-06
Posts: 4

Re: how to make a script to modify xfce4 panel?

Not to open this thread up again, but it is the exactly the topic I am looking to solve. I am trying to write a script that will build panels for me. I have 20 laptops that this script will run on.

I have tried to run the bash script provided above but am getting errors:

Option "-brief" is unknown, try "ip -help".
./panel2: line 436: declare: -n: invalid option
declare: usage: declare [-aAfFgilrtux] [-p] [name[=value] ...]
./panel2: line 437: declare: -n: invalid option
declare: usage: declare [-aAfFgilrtux] [-p] [name[=value] ...]
./panel2: line 438: declare: -n: invalid option
declare: usage: declare [-aAfFgilrtux] [-p] [name[=value] ...]
./panel2: line 439: declare: -n: invalid option
declare: usage: declare [-aAfFgilrtux] [-p] [name[=value] ...]
./panel2: line 440: declare: -n: invalid option
declare: usage: declare [-aAfFgilrtux] [-p] [name[=value] ...]
./panel2: line 441: declare: -n: invalid option
declare: usage: declare [-aAfFgilrtux] [-p] [name[=value] ...]
./panel2: line 442: declare: -n: invalid option
declare: usage: declare [-aAfFgilrtux] [-p] [name[=value] ...]
./panel2: line 443: declare: -n: invalid option
declare: usage: declare [-aAfFgilrtux] [-p] [name[=value] ...]
./panel2: line 444: declare: -n: invalid option
declare: usage: declare [-aAfFgilrtux] [-p] [name[=value] ...]


Is this the only way to be able to do something like this? Just looking for some suggestions, I've got pretty much everything all set in the script, dealing with the panels is the last thing.

Offline

#17 2016-12-06 23:54:42

jrv
Member
Registered: 2015-01-05
Posts: 12

Re: how to make a script to modify xfce4 panel?

Your first error, "Option "-brief" is unknown, try "ip -help"", indicates that you are not using a compatible version of the program "ip". It is used in the line, "ip -brief link". Try running that at the command line. I get:

euterpe@euterpe:~$ ip -brief link
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> 
eth0             UP             00:25:22:39:0e:83 <BROADCAST,MULTICAST,UP,LOWER_UP>

This is bash version 4.4.5(1)-release (x86_64-pc-linux-gnu) (bash --version) running on debian testing.

If you get something different (like your error message), you are going to have to figure out how to do something comparable on your distro. Likewise "-n" is a perfectly legal option in the version of bash I am running:

declare: usage: declare [-aAfFgilnrtux] [-p] [name[=value] ...]

Are you running an older version of bash, or is it possible you are unintentionally running in a shell other than bash?

JR

Last edited by jrv (2016-12-06 23:55:41)

Offline

#18 2016-12-07 04:15:51

firms
Member
Registered: 2016-12-06
Posts: 4

Re: how to make a script to modify xfce4 panel?

jrv wrote:

Are you running an older version of bash, or is it possible you are unintentionally running in a shell other than bash?

JR

That is where things get interesting. This is all being done on a Chromebook, running Ubuntu.

Linux localhost 3.14.0 #1 SMP PREEMPT Tue Nov 15 18:12:58 PST 2016 armv7l armv7l armv7l GNU/Linux

The -brief arguement is showing not found. This Chromebook is running the latest version of Ubuntu ARM. So first it looks like I need to get ip link figured out, and than look into the version of bash that is running on ARM.

Any suggestions are much appreciated, thanks for replying!

firms

Offline

#19 2016-12-07 08:51:29

luvr
Member
From: Boom ("Tomorrowland"), Belgium
Registered: 2016-09-25
Posts: 18

Re: how to make a script to modify xfce4 panel?

firms wrote:

The -brief arguement is showing not found. This Chromebook is running the latest version of Ubuntu ARM. So first it looks like I need to get ip link figured out, and than look into the version of bash that is running on ARM.

The "-brief" option on the ip command isn't really essential, but if you leave it out, then you will have to rework the sed command that extracts the network interface names from the output. In fact, that is how I initially considered doing this, but then I discovered the "-brief" option, which made it a whole lot easier.

Also, if you won't be using the Network Manager plugin anyway, you can simply leave the IP_LINKS variable blank. Alternatively, if all your computers use the same names for their network interfaces, you could even hard-code them.

The "-n" option on the declare or local command, on the other hand, is a pretty important feature, since the operation of the script is centered around the idea that the value of one variable can be interpreted as the name of another variable that you want to address (somewhat similar to references or pointers in typical programming languages, I guess). Without this feature, the dynamic nature of the script falls apart.

Offline

#20 2016-12-07 11:43:57

jrv
Member
Registered: 2015-01-05
Posts: 12

Re: how to make a script to modify xfce4 panel?

@firms:

As a historical note the "-n" argument for the declare bash builtin first shows up in documentation (but not in the changelogs) of bash 4.3. The current is bash 4.4 so you are almost certainly running an older version of bash.

The declare -n syntax, as best I can tell, makes the variable a synonym for another variable. Since the use in the script is all very readonly, it looks to me like you could just explicitly spell out each array, e.g. change:

declare -nr   LAUNCHER_HOSTS_FILE_VIEWER_PLUGIN_PROPERTIES='LAUNCHER_PROPERTIES_UNSET'

to:

declare -ar   LAUNCHER_HOSTS_FILE_VIEWER_PLUGIN_PROPERTIES=(
                                            'LAUNCHER_ARROW_POSITION_UNSET'
                                            'LAUNCHER_DISABLE_TOOLTIPS_UNSET'
                                            'LAUNCHER_MOVE_FIRST_UNSET'
                                            'LAUNCHER_SHOW_LABEL_UNSET'
              )

That won't improve maintainability, but it probably will run.

JR

Last edited by jrv (2016-12-07 14:13:55)

Offline

#21 2016-12-07 17:21:32

luvr
Member
From: Boom ("Tomorrowland"), Belgium
Registered: 2016-09-25
Posts: 18

Re: how to make a script to modify xfce4 panel?

jrv wrote:
declare -ar   LAUNCHER_HOSTS_FILE_VIEWER_PLUGIN_PROPERTIES=(
                                            'LAUNCHER_ARROW_POSITION_UNSET'
                                            'LAUNCHER_DISABLE_TOOLTIPS_UNSET'
                                            'LAUNCHER_MOVE_FIRST_UNSET'
                                            'LAUNCHER_SHOW_LABEL_UNSET'
              )

That won't improve maintainability, but it probably will run.

I don't really believe that will solve the problem. Yes, you do eliminate the indirection to the LAUNCHER_PROPERTIES_UNSET variable, but now you're left with indirections to each of the individual *_UNSET variables--which you would have to further expand. You may arrive at a workable solution if you do it intelligently, but it's not immediately clear to me how it would be done.

If you really cannot get access to the 'declare -n' feature, then you will likely be better off hard-coding the panel and plugin parameters (which is exactly what I tried to avoid, since I didn't want to manually have to keep track of panel ids and plugin ids). While this may make the script look more staightforward, it will certainly get far more painful to maintain. Another option, of course, may be to recode it in, say, Perl or Python (which I had also considered, but given that the process really just consists of a sequence of, mainly "xfconf-query", commands, I preferred a shell solution instead).

Offline

#22 2016-12-07 18:18:43

jrv
Member
Registered: 2015-01-05
Posts: 12

Re: how to make a script to modify xfce4 panel?

luvr wrote:

I don't really believe that will solve the problem. Yes, you do eliminate the indirection to the LAUNCHER_PROPERTIES_UNSET variable, but now you're left with indirections to each of the individual *_UNSET variables--which you would have to further expand. You may arrive at a workable solution if you do it intelligently, but it's not immediately clear to me how it would be done.

Forgive my lack of knowledge, but it looks to me like if the only problem were the handful of "declare -nr" statements, the solution I suggested would work ok. But I think you are suggesting that even though the error messages posted did not show them, there will be similar problems with "local -n" statements used in function calls. Is that what you are saying?

JR

Offline

#23 2016-12-07 22:26:27

firms
Member
Registered: 2016-12-06
Posts: 4

Re: how to make a script to modify xfce4 panel?

I really appreciate the input guys, definitely have given me some things to think about. Let me be a bit more clear about exactly what I am trying to acheive. The reason I was trying to run luvr script was because it was the only thing I found online that did any sort of thing like creating panels.

Thinking it over though, and for this current situation I am sure it is slightly overkill.

Since we are using ChromeOS to control most of the main functionality like WiFi, and such I am not worried about loosing access to those settings in XFCE panel because I can jump over to ChromeOS and connect to the correctnetwork in a matter of seconds.

Really all I want is one top panel that contains an Application Menu, shows currently opened programs, as well as workspaces, time, and battery level. These Chromebooks are being used in elementary and middle school learning environments and so cleaning up the Applications Menu to show ONLY the things that I want it is the biggest of my priorities in generating the panel.

Currently the script will update, and download all the software that we use. It will change the background image, delete the bottom panel, configures touchpad for Palm Detection, and right clicking, and hides all desktop items.

Really getting this panel set up is the last thing I need to do, and it's been the most pain in the butt! Was hoping I could just edit the XML files with new ones, or just do everything through xfconf-query but it seems to be a little more complex when working with the panels.

Thanks!

firms

Offline

#24 2016-12-07 22:41:50

firms
Member
Registered: 2016-12-06
Posts: 4

Re: how to make a script to modify xfce4 panel?

firms wrote:

Applications Menu to show ONLY the things that I want it is the biggest of my priorities in generating the panel.

Messing around with the Application Menu seems easy enough as just editing some files, etc.. So maybe my solution isn't to delete both panels and make a new one. Maybe it is to just delete the bottom panel, do some Application Menu changes, and pretty much I am good to go. The time is showing in 24 HR format but I am sure that can be changed easily.

Let me know what you think ...

Offline

#25 2016-12-08 08:14:22

luvr
Member
From: Boom ("Tomorrowland"), Belgium
Registered: 2016-09-25
Posts: 18

Re: how to make a script to modify xfce4 panel?

jrv wrote:

it looks to me like if the only problem were the handful of "declare -nr" statements, the solution I suggested would work ok.

That's correct, indeed. Your suggestion certainly shows a line of thinking that could eventually get the issues sorted out. The complication is, though, that there are multiple levels to "unwind", (i.e., one variable references another variable by name, and that variable references yet another variable by name, etc.). You would need to work out a pretty elaborate strategy to tackle the complete picture--though I'm sure that it should be possible, in the end.

But I think you are suggesting that even though the error messages posted did not show them, there will be similar problems with "local -n" statements used in function calls.

That is, indeed, yet another complication. Again, though, I'm sure that with the right approach this, too, could be overcome.

Offline

Board footer

Powered by FluxBB