Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
panel-plugins:xfce4-genmon-plugin:start [2021/03/22 13:22] – [Usage] toz | panel-plugins:xfce4-genmon-plugin:start [2023/07/02 09:06] – Update Latest Release section kevinbowen | ||
---|---|---|---|
Line 2: | Line 2: | ||
====== xfce4-genmon-plugin - Genmon ====== | ====== xfce4-genmon-plugin - Genmon ====== | ||
This plugin cyclically spawns the indicated script/ | This plugin cyclically spawns the indicated script/ | ||
+ | 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 image, a bar, a button and a personalized tooltip. | + | * **[[# |
+ | * XML Tags | ||
+ | * Example Script | ||
+ | * **[[# | ||
+ | * Pango Text Markup Support | ||
+ | * Refreshing the plugin | ||
+ | * Enhanced Gtk3 CSS Styling Capabilities | ||
* **[[# | * **[[# | ||
* **[[#Latest Release|Latest Release]]** | * **[[#Latest Release|Latest Release]]** | ||
Line 10: | Line 16: | ||
* **[[# | * **[[# | ||
+ | |||
+ | |||
+ | ===== Important Note about version 4.2.0 ===== | ||
+ | <note important> | ||
===== Usage ===== | ===== Usage ===== | ||
- | If you want the plugin to display only text (original version), enter the command in the //Command// field of the // | + | If you want the plugin to display only text (original version), enter the command in the //Command// field of the // |
**XML Tags** | **XML Tags** | ||
- | If you want the plugin to display a personalized '' | + | If you want the plugin to display a personalized |
The XML tags which can be used: | The XML tags which can be used: | ||
- | * '' | + | * **< |
- | * ''< | + | * Displays the "Text to display" |
- | * ''< | + | |
- | * '' | + | * Result: {{: |
- | * '' | + | * **< |
- | * ''< | + | * If displaying text, this tag will allow for a program/ |
- | * '' | + | |
- | * ''< | + | * **<img>Path to the image to display</ |
+ | * Display an image on the plugin using the complete path and name to the image file. | ||
+ | * eg. '' | ||
+ | * Result: {{: | ||
+ | * **< | ||
+ | * If using an image, this tag will allow for a program/ | ||
+ | * eg. '' | ||
+ | * **< | ||
+ | * Display an icon from the current icon theme using only the icon name. | ||
+ | * eg. '' | ||
+ | * Result: {{: | ||
+ | * Note: the < | ||
+ | * image changes with the icon theme | ||
+ | | ||
+ | * supports light/dark symbolic icon auto-colour changes | ||
+ | * **< | ||
+ | * If using an icon, this tag will allow for a program/ | ||
+ | * eg. '' | ||
+ | * **< | ||
+ | * Display specific content in a tooltip. | ||
+ | * eg. '' | ||
+ | * Result: {{: | ||
+ | * Note: | ||
+ | * To hide the tooltip bubble, use an empty tool tag, eg: '' | ||
+ | * The tooltip will not display with a cycle of less than 0.5 (see: [[https:// | ||
+ | * **< | ||
+ | * Display a value-based progress bar on the plugin. | ||
+ | * eg. '' | ||
+ | * Result: {{: | ||
+ | * **< | ||
+ | * This tag will allow the embedding of css tweaks directly into the plugin. | ||
+ | * eg. '' | ||
+ | * Result: {{: | ||
+ | * More information on css and css tweaking of the plugin in the **Advanced Features** section below. | ||
- | The < | + | If None of the tags are detected in the result of the command, the plugin reverts to its original behavior (displaying the result of the command). |
- | * image changes with the icon theme | + | |
- | * supports panel' | + | |
- | * supports light/dark symbolic icon auto-colour changes | + | |
- | If None of the tags are detected in the result of the command, the plugin returns to its original behaviour | + | **Example Script |
- | **Example Script | + | Here is an example of a genmon plugin displaying basic system stats (cpu, memory, harddrive usage) using the < |
+ | <file sh systemstats.sh> | ||
+ | #!/bin/sh | ||
- | Here's a simple example of a plugin displaying the Temp of the CPU in the panel | + | ICON=utilities-system-monitor |
- | (with an icon) and the Freq in a Tooltip: | + | PARTITION=sda2 |
- | <file sh cuptemp.sh> | + | |
- | # | + | |
- | echo "< | + | |
- | declare -i cpuFreq | + | |
- | cpuFreq=$(cat / | + | |
- | if [ $cpuFreq -ge 1000 ] | + | |
- | then | + | |
- | cpu=$(echo $cpuFreq | cut -c1).$(echo $cpuFreq | cut -c2)GHz | + | |
- | else | + | |
- | cpu=${cpuFreq}MHz | + | |
- | fi | + | |
- | echo "< | + | |
- | echo "< | + | |
- | </ | + | |
- | PS: Depending on your configuration, you should change the image path. | + | # get CPU info |
+ | CPU=$(cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | awk -v RS="" | ||
+ | CPULOAD=$(uptime | tr -s " " | cut -d' ' -f9-) | ||
+ | TOPCPU=$(ps aux --no-headers | awk ' | ||
- | **Another Example Script | + | # get memory info |
+ | MEMTOT=$(cat / | ||
+ | MEMAVA=$(cat / | ||
+ | MEMUSAGE=$(free | grep Mem | awk ' | ||
+ | MEMUSAGE2=$(echo " | ||
+ | MEMUSED=$(echo " | ||
+ | TOPMEM=$(ps aux --no-headers | awk ' | ||
- | Here's a another simple example of a plugin displaying the keyboard LED states of the caps, num and scroll lock keys: | + | # get hard drive usage info |
- | <file sh kbdleds.sh> | + | HD=$(df -hl / |
- | #!/bin/bash | + | HDUSED=$(df -hl / |
- | # genmon script to display status of keyboard LEDS | + | HDSIZE=$(df -hl / |
- | # genmon properties: | + | TOPHD=$(df -hl / |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # configuration | + | # do the genmon |
- | FG="white" | + | echo "< |
- | OBC="red" | + | echo "<txt> $CPU | $MEMUSAGE | $HD </ |
+ | echo "< | ||
+ | $TOPCPU | ||
- | # code | + | -=MEM: $MEMUSED of $MEMUSAGE2=- |
- | STATE=($(xset q | grep Caps\ Lock | awk ' | + | $TOPMEM |
- | CAPS=$([[ ${STATE[0]} == " | + | |
- | NUM=$([[ ${STATE[1]} == " | + | |
- | SCROLL=$([[ ${STATE[2]} == " | + | |
- | # genmon | + | -=HD usage: |
- | echo "< | + | $TOPHD</ |
- | echo "< | + | |
- | echo "NUM = ${STATE[1]}" | + | |
- | echo " | + | |
exit 0 | exit 0 | ||
</ | </ | ||
- | More scripts are available at: [[http:// | + | {{: |
- | **Pango Markups in the <txt> tag** | + | <note> |
- | Both the <txt> and < | + | 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:// | ||
+ | * [[https://github.com/ | ||
+ | * [[https:// | ||
- | | + | |
+ | [[|Back To Top]] | ||
+ | ---- | ||
+ | |||
+ | ===== Advanced Features ===== | ||
+ | **Pango Text Markup Support** | ||
+ | |||
+ | Both the <txt> and < | ||
+ | |||
+ | | ||
+ | |||
+ | Result: {{: | ||
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. | ||
Line 99: | Line 143: | ||
**Refreshing the plugin** | **Refreshing the plugin** | ||
- | The xfce4-genmon-plugin | + | 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: |
- | + | ||
- | To refresh the plugin, issue the command: | + | |
xfce4-panel --plugin-event=genmon-X: | xfce4-panel --plugin-event=genmon-X: | ||
where " | where " | ||
+ | As of version 4.2.0, an " | ||
+ | |||
+ | {{: | ||
**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 (~/ | + | As of version 4.0.1, |
- | // | + | And as of version 4.2.0, this plugin |
- | *added support for single or multi-row support. Single row support spans the plugin to take up all of the space available where panel rows is greater than 1. Multi-row support means that the plugin | + | |
- | *added css tag support | + | |
<file genmonTest.sh> | <file genmonTest.sh> | ||
#!/bin/bash | #!/bin/bash | ||
- | echo "< | + | # set Label = Hello |
+ | echo "< | ||
echo "< | echo "< | ||
echo "< | echo "< | ||
echo "< | echo "< | ||
</ | </ | ||
- | Additional testing of the new code in the git tree would be appreciated. | + | |
+ | Result: {{: | ||
[[|Back To Top]] | [[|Back To Top]] | ||
Line 127: | Line 173: | ||
===== Screenshots ===== | ===== Screenshots ===== | ||
- | {{: | ||
- | In this example, the plugin is used to (from left to right): | + | Configuration/Properties screen: |
- | - 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: | + | About screen: |
- | In this example, we see the gmail checker script in action: | + | {{:panel-plugins: |
- | | + | |
- | | + | |
- | | + | |
- | |||
- | |||
- | {{: | ||
- | |||
- | 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//) | ||
- | |||
- | |||
- | |||
- | {{: | ||
- | |||
- | 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 | ||
- | |||
- | |||
- | |||
- | {{: | ||
- | {{: | ||
- | |||
- | 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]] | [[|Back To Top]] | ||
Line 181: | Line 188: | ||
===== Latest Release ===== | ===== Latest Release ===== | ||
- | {{rss> | ||
- | | + | {{rss> |
+ | |||
+ | [[https:// | ||
+ | |||
+ | | ||
[[|Back to Top]] | [[|Back to Top]] | ||
---- | ---- | ||
+ | |||
===== Source code repository ===== | ===== Source code repository ===== | ||
+ | |||
[[https:// | [[https:// | ||
+ | |||
---- | ---- | ||
+ | |||
===== Reporting Bugs ===== | ===== Reporting Bugs ===== | ||
+ | |||
* **[[: | * **[[: | ||