Both sides previous revisionPrevious revisionNext revision | Previous revision |
panel-plugins:xfce4-genmon-plugin:start [2023/04/19 16:50] – [Usage] toz | panel-plugins:xfce4-genmon-plugin:start [2025/01/03 04:17] (current) – update screenshot kevinbowen |
---|
~~NOTOC~~ | ~~NOTOC~~ |
====== xfce4-genmon-plugin - Genmon ====== | ====== xfce4-genmon-plugin - Generic Monitor Plugin ====== |
This plugin cyclically spawns the indicated script/program, captures its output (stdout) and displays the resulting string into the panel. | 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 formatted text, image/icon, a bar, a button, and a personalized tooltip. | The string can also contain markup to displayed an formatted text, image/icon, a bar, a button, and a personalized tooltip. |
| |
* **[[#Usage|Usage]]** | |
* **[[#Advanced Features|Advanced Features]]** | |
* **[[#Screenshots|Screenshots]]** | * **[[#Screenshots|Screenshots]]** |
| * **[[#Usage|Usage]]** |
| * XML Tags |
| * Example Script |
| * **[[#Advanced Features|Advanced Features]]** |
| * Pango Text Markup Support |
| * Refreshing the plugin |
| * Enhanced Gtk3 CSS Styling Capabilities |
* **[[#Latest Release|Latest Release]]** | * **[[#Latest Release|Latest Release]]** |
* **[[#Source Code Repository|Source Code Repository]]** | * **[[#Source Code Repository|Source Code Repository]]** |
| |
===== Important Note about version 4.2.0 ===== | ===== Important Note about version 4.2.0 ===== |
| |
<note important>In version 4.2.0, the backend settings have been migrated from rc files to xfconf. Individual plugin settings will not be automatically migrated to xfconf and each plugin will need to be manually re-configured. A script has been developed ([[https://gitlab.xfce.org/panel-plugins/xfce4-genmon-plugin/-/blob/master/scripts/migrate_to_xfconf.sh]]) that can offer assistance for the migration. </note> | <note important>In version 4.2.0, the backend settings have been migrated from rc files to xfconf. Individual plugin settings will not be automatically migrated to xfconf and each plugin will need to be manually re-configured. A script has been developed ([[https://gitlab.xfce.org/panel-plugins/xfce4-genmon-plugin/-/blob/master/scripts/migrate_to_xfconf.sh]]) that can offer assistance for the migration. </note> |
| |
| |
| ===== Screenshots ===== |
| |
| <figure "Genmon Configuration/Properties Dialog Window"> |
| {{:panel-plugins:xfce4-genmon-plugin-properties.png|Genmon Configuration/Properties Dialog Window}} |
| </figure> |
| |
| [[|Back To Top]] |
| ---- |
| |
===== Usage ===== | ===== Usage ===== |
| |
| |
| - [[:xfce:xfce4-panel:add-new-items|Add the plugin to the panel]]. |
| - Right-click on the added plugin, select **Properties** to open the settings window. |
| |
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. Otherwise, xml tags are used to display content on the plugin. | 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. Otherwise, xml tags are used to display content on the plugin. |
| |
* Displays the "Text to display" directly on the plugin. | * Displays the "Text to display" directly on the plugin. |
* eg. ''echo "<txt>Hello World!</txt>"'' | * eg. ''echo "<txt>Hello World!</txt>"'' |
* Result: {{:panel-plugins:xfce4-genmon-plugin:txt.png?100|}} | * Result: \\ {{:panel-plugins:xfce4-genmon-plugin:txt.png?100|Genmon Display Text Example}} |
* **<txtclick>The command to be executed when clicking on the text</txtclick>** | * **<txtclick>The command to be executed when clicking on the text</txtclick>** |
* If displaying text, this tag will allow for a program/script to be run when the text is clicked. | * If displaying text, this tag will allow for a program/script to be run when the text is clicked. |
* Display an image on the plugin using the complete path and name to the image file. | * Display an image on the plugin using the complete path and name to the image file. |
* eg. ''echo "<img>/usr/share/pixmaps/xfce4_xicon.png</img>"'' | * eg. ''echo "<img>/usr/share/pixmaps/xfce4_xicon.png</img>"'' |
* Result: {{:panel-plugins:xfce4-genmon-plugin:img.png?50|}} | * Result: \\ {{:panel-plugins:xfce4-genmon-plugin:img.png?50|Genmon Display Image with Full Path Example}} |
* **<click>The command to be executed when clicking on the image</click>** | * **<click>The command to be executed when clicking on the image</click>** |
* If using an image, this tag will allow for a program/script to be run when the image is clicked. | * If using an image, this tag will allow for a program/script to be run when the image is clicked. |
* Display an icon from the current icon theme using only the icon name. | * Display an icon from the current icon theme using only the icon name. |
* eg. ''echo "<icon>org.xfce.mousepad</icon>"'' | * eg. ''echo "<icon>org.xfce.mousepad</icon>"'' |
* Result: {{:panel-plugins:xfce4-genmon-plugin:icon.png?50|}} | * Result: \\ {{:panel-plugins:xfce4-genmon-plugin:icon.png?50|Genmon Display Themed Icon Example}} |
* Note: the <icon> tag allows the following functionality: | * Note: the <icon> tag allows the following functionality: |
* image changes with the icon theme | * image changes with the icon theme |
* supports panel's Adjust Icon Size Automatically functionality | * supports panel's 'Adjust Icon Size Automatically' functionality |
* supports light/dark symbolic icon auto-colour changes | * supports light/dark symbolic icon auto-colour changes |
* **<iconclick>The command to be executed when clicking on the icon</click>** | * **<iconclick>The command to be executed when clicking on the icon</click>** |
* Display specific content in a tooltip. | * Display specific content in a tooltip. |
* eg. ''echo "<tool>My custom tooltip text</tool>"'' | * eg. ''echo "<tool>My custom tooltip text</tool>"'' |
* Result: {{:panel-plugins:xfce4-genmon-plugin:tool.png?150|}} | * Result: \\ {{:panel-plugins:xfce4-genmon-plugin:tool.png?150|Genmon Tooltip Text Display Example}} |
* Note: | * Note: |
* To hide the tooltip bubble, use an empty tool tag, eg: ''echo "<tool></tool>"'' | * To hide the tooltip bubble, use an empty tool tag, eg: ''echo "<tool></tool>"'' |
| * The tooltip will not display with a cycle of less than 0.5 (see: [[https://gitlab.gnome.org/GNOME/gtk/-/issues/826]]) |
* **<bar>Percentage to display in the bar</bar>** | * **<bar>Percentage to display in the bar</bar>** |
* Display a value-based progress bar on the plugin. | * Display a value-based progress bar on the plugin. |
* eg. ''echo "<bar>42</bar>"'' (this will show a progress bar at 42%) | * eg. ''echo "<bar>42</bar>"'' (this will show a progress bar at 42%) |
* Result: {{:panel-plugins:xfce4-genmon-plugin:bar.png?50|}} | * Result: \\ {{:panel-plugins:xfce4-genmon-plugin:bar.png?50|Genmon Percentage Bar Display Example}} |
* **<css>embedded CSS tweaks</css>** | * **<css>embedded CSS tweaks</css>** |
* This tag will allow the embedding of css tweaks directly into the plugin. | * This tag will allow the embedding of css tweaks directly into the plugin. |
* eg. ''echo "<css>.genmon_valuebutton { background-color:green; color: yellow; padding: 5px} .genmon_label { color: lightblue; }</css>"'' | * eg. ''echo "<css>.genmon_valuebutton { background-color:green; color: yellow; padding: 5px;}</css>"'' |
* Result: {{:panel-plugins:xfce4-genmon-plugin:css.png?50|}} | * Result: \\ {{:panel-plugins:xfce4-genmon-plugin:css.png?50|Genmon Embedded CSS Example}} |
* More information on css and css tweaking of the plugin in the **Advanced Features** section below. | * More information on css and css tweaking of the plugin in the **Advanced Features** section below. |
| |
| |
ICON=utilities-system-monitor | ICON=utilities-system-monitor |
PARTITION=sda1 | PARTITION=sda2 |
| |
# get CPU info | # get CPU info |
| |
# do the genmon | # do the genmon |
echo "<icon>$ICON</icon><txt> $CPU | $MEMUSAGE | $HD </txt><txtclick>xfce4-taskmanager</txtclick> | echo "<icon>$ICON</icon><iconclick>xfce4-taskmanager</iconclick>" |
<tool>-=CPU $CPULOAD=- | echo "<txt> $CPU | $MEMUSAGE | $HD </txt><txtclick>xfce4-taskmanager</txtclick>" |
| echo "<tool>-=CPU $CPULOAD=- |
$TOPCPU | $TOPCPU |
| |
</file> | </file> |
| |
{{:panel-plugins:xfce4-genmon-plugin:syststats.png?200|}} | <figure "Genmon syststats.sh Script Example"> |
| {{:panel-plugins:xfce4-genmon-plugin:syststats.png?300|Genmon syststats.sh Script Example}} |
| </figure> |
| |
<note>More scripts are available at: [[https://gitlab.xfce.org/panel-plugins/xfce4-genmon-plugin/-/tree/master/scripts]].</note> | <note>More scripts are available at: [[https://gitlab.xfce.org/panel-plugins/xfce4-genmon-plugin/-/tree/master/scripts]].</note> |
| |
| Additional genmon scripts can be found in the following online repositories (special thanks to the individual developers for creating them): |
| * [[https://github.com/xtonousou/xfce4-genmon-scripts]] |
| * [[https://github.com/almaceleste/xfce4-genmon-scripts]] |
| * [[https://github.com/levimake/xfce4-genmon-panel-scripts]] |
| * [[https://codeberg.org/jn/genmon-scripts]] |
| |
| |
[[|Back To Top]] | [[|Back To Top]] |
**Pango Text Markup Support** | **Pango Text Markup Support** |
| |
Both the <txt> and <tool> tags support Pango Markups. See: [[https://developer.gnome.org/pygtk/stable/pango-markup-language.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: | Both the <txt> and <tool> tags support Pango Markups. See: [[https://docs.gtk.org/Pango/pango_markup.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> (or any convenience) tag within the <txt></txt> or <tool></tool> tags. For example, to display the output in bold red and italic, you could use something like: |
| |
echo "<txt><span weight='Bold' fgcolor='Red'><i>Test</i></span></txt>" | echo "<txt><span weight='Bold' fgcolor='Red'><i>Test</i></span></txt>" |
| |
Result: {{:panel-plugins:xfce4-genmon-plugin:pango.png?50|}} | Result: |
| |
| <figure "Genmon Pango Markup Support Example"> |
| {{:panel-plugins:xfce4-genmon-plugin:pango.png?50|Genmon Pango Markup Support Example}} |
| </figure> |
| |
Refer to the previous link for information on all of the properties that can be set. | Refer to the previous link for information on all of the properties that can be set. |
**Refreshing the plugin** | **Refreshing the plugin** |
| |
The xfce4-genmon-plugin supports xfce4-panel plugin-event functionality to remotely force the plugin to refresh. To refresh the plugin, issue the command: | As of version 3.99, the xfce4-genmon-plugin supports xfce4-panel plugin-event functionality to remotely force the plugin to refresh. To refresh the plugin, issue the command: |
| |
xfce4-panel --plugin-event=genmon-X:refresh:bool:true | 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. | 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. |
| |
As of version 4.2.0, there is also now an "Update Now" menu item on the plugin right-click menu to immediately update the plugin (this does not reset the timer): | As of version 4.2.0, an "Update Now" menu item was added to the plugin right-click menu to immediately update the plugin (this does not reset the timer): |
| |
{{:panel-plugins:xfce4-genmon-plugin:updatenow.png?125|}} | <figure "Genmon 'Update Now' Menu Item"> |
| {{:panel-plugins:xfce4-genmon-plugin:updatenowmenu.png|Genmon 'Update Now' Menu Item}} |
| </figure> |
| |
**Enhanced Gtk3 CSS Styling Capabilities** | **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]]. | As of version 4.0.1, 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://gitlab.xfce.org/panel-plugins/xfce4-genmon-plugin/-/blob/master/CSS%20Styling.txt]]. |
| |
As of version 4.2.0, this plugin also supports CSS tags (special thanks to @stergem) that allow you to tweak the plugin css directly from within the command/script using <css></css> tags. For example: | And as of version 4.2.0, this plugin also supports CSS tags (special thanks to @stergem) that allow you to tweak the plugin css directly from within the command/script using <css></css> tags. For example: |
<file genmonTest.sh> | <file genmonTest.sh> |
#!/bin/bash | #!/bin/bash |
</file> | </file> |
| |
Result: {{:panel-plugins:xfce4-genmon-plugin:hellothere.png?90|}} | Result: \\ {{:panel-plugins:xfce4-genmon-plugin:hellothere.png?90|Genmon Enhanced Gtk3 CSS Styling Capabilities Example}} |
| |
| |
---- | ---- |
| |
===== Screenshots ===== | ===== Latest Release ===== |
{{:panel-plugins:xfce4-genmon-plugin.png|:panel-plugins:xfce4-genmon-plugin.png}} | |
| |
In ^this^ example, the plugin is used to (from left to right): | {{rss>https://archive.xfce.org/feeds/project/xfce4-genmon-plugin 1 date 2h}} |
- 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 | |
| |
| [[https://gitlab.xfce.org/panel-plugins/xfce4-genmon-plugin/-/blob/master/NEWS|Read the CHANGELOG]] |
| |
| * **[[https://archive.xfce.org/src/panel-plugins/xfce4-genmon-plugin/|Download current release]]** (older versions of this component are also available here) |
| |
{{:panel-plugins:gmail.png|:panel-plugins:gmail.png}} | [[|Back to Top]] |
| |
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 | |
| |
| ---- |
| |
| ===== Source code repository ===== |
| |
{{:panel-plugins:googcal.png|:panel-plugins:googcal.png}} | [[https://gitlab.xfce.org/panel-plugins/xfce4-genmon-plugin]] |
| |
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 | |
| |
| |
| |
Most of the scripts are available in the plugin archive. | |
| |
[[|Back To Top]] | |
---- | ---- |
| |
===== Latest Release ===== | ===== Reporting Bugs ===== |
{{rss>https://archive.xfce.org/feeds/project/xfce4-genmon-plugin 1 date description 2h}} | |
| |
* **[[https://archive.xfce.org/src/panel-plugins/xfce4-genmon-plugin/|Previous Releases]]** | * **[[:panel-plugins:xfce4-genmon-plugin:bugs|Reporting Bugs]]** -- List of currently open bugs and instructions on how to submit new bug reports |
| |
[[|Back to Top]] | |
| |
---- | |
===== Source code repository ===== | |
[[https://gitlab.xfce.org/panel-plugins/xfce4-genmon-plugin]] | |
---- | |
===== Reporting Bugs ===== | |
* **[[:panel-plugins:xfce4-genmon-plugin:bugs|Reporting Bugs]]** -- Open bug reports and how to report new bugs | |
| |
[[|Back To Top]] | [[|Back To Top]] |
---- | ---- |
[[ :xfce:xfce4-panel:start:|Return to Main Xfce4-panel page]] | [[:xfce:xfce4-panel:start:|Return to xfce4-panel Main Documentation Page]] |