Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
panel-plugins:xfce4-genmon-plugin [2020/04/12 02:19] – [Usage] tozpanel-plugins:xfce4-genmon-plugin [2021/03/18 14:43] (current) – removed kevinbowen
Line 1: Line 1:
-~~NOTOC~~ 
-====== Genmon ====== 
-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. 
- 
-  * **[[#Screenshots|Screenshots]]** 
-  * **[[#Latest Release|Latest Release]]** 
-  * **[[#Source Code Repository|Source Code Repository]]** 
-  * **[[#Reporting Bugs|Reporting Bugs]]** 
- 
- 
-===== Usage ===== 
-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>'' 
- 
-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: 
- 
-  #!/bin/bash 
-  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 ] 
-  then 
-    cpu=$(echo $cpuFreq | cut -c1).$(echo $cpuFreq | cut -c2)GHz 
-  else 
-    cpu=${cpuFreq}MHz 
-  fi 
-  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** 
- 
-Both the <txt> and <tool> tags support 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> or <tool></tool> 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** 
- 
-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. 
- 
- 
-**Enhanced Gtk3 CSS Styling Capabilities** 
- 
-CSS styling capabilities have been enhanced by providing style classes for all elements of the plugin that can be styled via themes or individual overrides (~/.config/gtk-3.0/gtk.css). For more information, see: [[https://git.xfce.org/panel-plugins/xfce4-genmon-plugin/tree/CSS%20Styling.txt]]. 
- 
-//**(*dev-only)**// functionality is currently only available in the git tree and has not yet been officially released 
-  * Configuration window layout was slightly updated 
-  * Close button was renamed to Save. Clicking Save now saves the configuration changes. Closing the window using the X in the window titlebar exists the configuration dialog with no changes made 
-  * Added support for the new libxfce4ui API (CSD) 
-  * Enabled panel multi-row support. If panel exceeds 1 row, the plugin will only occupy one row. 
-  * Added <icon> and <iconclick> elements. They operate in the same manner as <img> and <click> but use an icon from the icon theme instead of an image. (ex. echo "<icon>gtk-edit</icon>"). This adds the new following functionality: 
-  *   * image changes with the icon theme 
-  *   * supports panel's Adjust Icon Size Automatically functionality 
-  *   * supports light/dark symbolic icon auto-colour changes 
- 
- 
-[[|Back To Top]] 
----- 
- 
-===== Screenshots ===== 
-{{:panel-plugins:xfce4-genmon-plugin.png|:panel-plugins:xfce4-genmon-plugin.png}} 
- 
-In this example, the plugin is used to (from left to right): 
-  - display the date 
-  - mount/unmount an USB disk with 1 click 
-  - display the CPU temperature (and the frequency in the tooltip) 
-  - display the HD temperature 
-  - display the state of the 2 batteries of my laptop 
-  - display the WIFI quality 
- 
- 
- 
-{{:panel-plugins:gmail.png|:panel-plugins:gmail.png}} 
- 
-In this example, we see the gmail checker script in action: 
-  - plugin display shows icon indicating state of new emails available 
-  - tooltip shows number of new messages, sender/subject of new messages, and timestamp of last check 
-  - clicking on the icon launches your email program 
- 
- 
- 
-{{:panel-plugins:sysstat.png|:panel-plugins:sysstat.png}} 
- 
-In this example, we see the sysstat script in action: 
-  - plugin display shows optional icon and 3 readings (cpu, memory, hard drive usage) 
-  - tooltip shows top 5 cpu and memory uses and hard drive space usage 
-  - clicking on the text output launches xfce4-taskmanager (//ver. 3.99 or greater//) 
- 
- 
- 
-{{:panel-plugins:googcal.png|:panel-plugins:googcal.png}} 
- 
-In this example, we see the google calendar checker script in action: 
-  - plugin display shows icon indicating state of new upcoming appointments 
-  - tooltip shows a listing of upcoming appointments 
-  - clicking on the icon opens google calendar in your browser 
- 
- 
- 
-{{:panel-plugins:twit0.png|:panel-plugins:twit0.png}} 
-{{:panel-plugins:twit1.png|:panel-plugins:twit1.png}} 
- 
-In this example, we see the twit (Twitter Timeline Notifier) script in action: 
-  - plugin display shows icon indicating state of new tweets in your timeline 
-  - libnotify notifications will be sent with new tweets 
-  - tool tip will show new and optionally recent tweets 
-  - clicking on the plugin icon can either execute a program, display a yad dialog with all recent tweets (above image), or compose and send a tweet. 
- 
-Most of the scripts are available in the plugin archive. 
- 
-[[|Back To Top]] 
----- 
- 
-===== Latest Release ===== 
-==== 4.0.2 (2019/08/11) ==== 
-[[http://archive.xfce.org/src/panel-plugins/xfce4-genmon-plugin/4.0/xfce4-genmon-plugin-4.0.2.tar.bz2|xfce4-genmon-plugin-4.0.2.tar.bz2]] 
- 
-**SHA-256 Hash**: 256c22526f61aabf43b91b903b976c13e56198657667df443cdb06b31fbf23aa \\ 
-**SHA-1 Hash**: cffc57ae3bce3ac0b3d5a6a055ef533907bb398c \\ 
-**MD5 Hash**: d808fe77a438c95b97ec6feda6162d22 
- 
----- 
-===== Release History ===== 
-==== 4.0.1 (2017/10/29) ==== 
-  * Allow pango markup in tooltip as well 
-  * Added some extra sample scripts (twit, google calendar, sysstat) 
-  * Enhanced CSS styling capabilites (see 'CSS Styling.txt' doc) 
-  * Fix progressbar wrong direction 
- 
-==== 4.0.0 (2017/02/25) ==== 
-  * Fix PangoFontDescription not being able to display initial default string 
- 
-==== 3.99 (2016/11/02) ==== 
-  * Port to Gtk3 
-  * Fix font styling to work with Gtk 3.22 
-  * Add support for "genmon" in 'xfce4-panel --plugin-event' (Bug #10734) 
-  * Fix default tooltip does not work (bug #11284) 
-  * Add <txtclick> functionality (Bug #3437) 
- 
-==== 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 ===== 
-{{rss>http://git.xfce.org/panel-plugins/xfce4-genmon-plugin/atom/ 5 date}} 
- 
-===== 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 ===== 
-[[http://git.xfce.org/panel-plugins/xfce4-genmon-plugin/]] 
----- 
-===== Reporting Bugs ===== 
-If you encounter a bug in ''Genmon'', please submit a bug report to the [[https://bugzilla.xfce.org/|Xfce Bugzilla]]. Please note that to do this you will need to have / create an account on Bugzilla. 
- 
-<note important>Before reporting a new bug, please try your best to check if it has already been reported (see the latest reports below). [[https://bugzilla.xfce.org/buglist.cgi?list_id=14522&product=xfce4-genmon-plugin&resolution=---|Click here for a full list of bug reports]].</note>  
- 
-**[[http://bugzilla.xfce.org/enter_bug.cgi?product=xfce4-genmon-plugin|File a new bug or enhancement request]]** 
- 
-==== Open Bugs ==== 
-{{rss>https://bugzilla.xfce.org/buglist.cgi?product=xfce4-genmon-plugin;query_format=advanced;ctype=atom 20 1d date}} 
- 
-[[|Back To Top]] 
----- 
-[[ :xfce:xfce4-panel:start:|Return to Main Xfce4-panel page]]