Xfce Wiki

Sub domains

Site Tools



This plugin cyclically spawns the indicated script/program, captures its output (stdout) and displays the resulting string into the panel.

The string can also contain markup to displayed an image, a bar, a button and a personalized tooltip.


If you want the plugin to display only text (original version), enter the command in the Command field of the Properties section of the plugin.

XML Tags

If you want the plugin to display a personalized Image or Tooltip or Bar or Button, you should develop (or get) a script returning a XML string, and enter the path of this script in the Command field of the Property section of the plugin.

The XML tags which can be used:

  • <txt>Text to display</txt>
  • <img>Path to the image to display</img>
  • <tool>Tooltip text</tool>
  • <bar>Pourcentage to display in the bar</bar>
  • <click>The command to be executed when clicking on the image</click>
  • <txtclick>The command to be executed when clicking on the text</txtclick> (*dev-only)

If None of the tags are detected in the result of the command, the plugin returns to its original behaviour (displaying the result of the command).

Example Script

Here's a simple example of a plugin displaying the Temp of the CPU in the panel (with an icon) and the Freq in a Tooltip:

echo "<img>/usr/share/icons/Bluecurve/16x16/apps/gnome-monitor.png</img>"
declare -i cpuFreq
cpuFreq=$(cat /proc/cpuinfo | grep "cpu MHz" | sed 's/\ \ */ /g' | cut -f3 -d" " | cut -f1 -d".")
if [ $cpuFreq -ge 1000 ]
  cpu=$(echo $cpuFreq | cut -c1).$(echo $cpuFreq | cut -c2)GHz
echo "<txt>"$(cat /proc/acpi/thermal_zone/THM/temperature | sed 's/\ \ */ /g' | cut -f2 -d" ")" C</txt>"
echo "<tool>Freq: "$cpu"</tool>"

PS: Depending on your configuration, you should change the image path.

More scripts are available at: http://git.xfce.org/panel-plugins/xfce4-genmon-plugin/tree/scripts.

Pango Markups in the <txt> tag

The <txt> tag supports Pango Markups. See: https://developer.gnome.org/pango/stable/PangoMarkupFormat.html. With Pango markups, you can change text attributes like font colour, weight, size, etc, in your output string. To do so, use the <span></span> tag within the <txt></txt> tags. For example, to display the output in bold red, you could use something like:

echo "<txt><span weight='Bold' fgcolor='Red'>Test</span></txt>"

Refer to the previous link for information on all of the properties that can be set.

Refreshing the plugin (*dev-only)

The xfce4-genmon-plugin now supports xfce4-panel plugin-event functionality. Currently it only supports the “refresh” action which resets the timer and causes the associated command to execute again. You can use this command remotely or at the end of a script to force the panel plugin to refresh.

To refresh the plugin, issue the command:

xfce4-panel --plugin-event=genmon-X:refresh:bool:true    

where “genmon-X” is the widget name of the particular genmon instance. To get this name, go to the panel properties screen and on the Items tab, hover your mouse over the genmon plugin to get it's internal name.

(*dev-only) functionality is currently only available in the git tree and has not yet been officially released



In this example, the plugin is used to (from left to right):

  1. display the date
  2. mount/unmount an USB disk with 1 click
  3. display the CPU temperature (and the frequency in the tooltip)
  4. display the HD temperature
  5. display the state of the 2 batteries of my laptop
  6. display the WIFI quality

Most of the scripts are available in the plugin archive.

Recent Releases

3.4 (2012/05/12)

  • Port from libxfcegui4 to libxfce4ui
  • Install as a shared library rather than an executable
  • No longer uses troublesome fixed-length text buffers
  • Bug fixes

Recent Changes

Reporting Bugs

Bugs should be reported to the Xfce bug tracking system.

Open Bugs

Getting it

The normal (and best) way to get this plugin is to use the package manager or port system of your operating system.

If it isn't available there, or if you want a different version, you can download it in source form from http://archive.xfce.org/src/panel-plugins/xfce4-genmon-plugin/.

Source code repository

projects/panel-plugins/xfce4-genmon-plugin.txt · Last modified: 2016/07/02 16:10 by toz