Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
panel-plugins:xfce4-genmon-plugin:start [2019/11/09 12:27] – created kevinbowen | panel-plugins:xfce4-genmon-plugin:start [2023/12/25 13:25] (current) – [Advanced Features] updated link toz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Genmon ====== | + | ~~NOTOC~~ |
- | + | ====== | |
- | ===== About ===== | + | |
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. | ||
+ | |||
+ | * **[[# | ||
+ | * XML Tags | ||
+ | * Example Script | ||
+ | * **[[# | ||
+ | * Pango Text Markup Support | ||
+ | * Refreshing the plugin | ||
+ | * Enhanced Gtk3 CSS Styling Capabilities | ||
+ | * **[[# | ||
+ | * **[[#Latest Release|Latest Release]]** | ||
+ | * **[[#Source Code Repository|Source Code Repository]]** | ||
+ | * **[[# | ||
+ | |||
+ | |||
- | The string can also contain markup to displayed an image, a bar, a button | + | ===== 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" |
- | * ''< | + | * eg. '' |
- | * '' | + | * Result: {{: |
- | * ''< | + | * **< |
- | * ''< | + | * If displaying text, this tag will allow for a program/ |
+ | * eg. '' | ||
+ | * **< | ||
+ | * 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. '' | ||
+ | * **<icon>Themed icon to be displayed</ | ||
+ | * 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 | ||
+ | * **<iconclick>The command to be executed when clicking on the icon</ | ||
+ | * 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. | ||
- | If None of the tags are detected in the result of the command, the plugin | + | If None of the tags are detected in the result of the command, the plugin |
- | **Example Script** | + | **Example Script |
- | Here's a simple | + | Here is an example of a genmon |
- | (with an icon) and the Freq in a Tooltip: | + | <file sh systemstats.sh> |
+ | #!/bin/sh | ||
- | # | + | ICON=utilities-system-monitor |
- | echo "< | + | PARTITION=sda2 |
- | 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 ' | ||
- | More scripts are available at: [[http://git.xfce.org/panel-plugins/xfce4-genmon-plugin/tree/scripts]]. | + | # get memory info |
+ | MEMTOT=$(cat | ||
+ | MEMAVA=$(cat | ||
+ | MEMUSAGE=$(free | grep Mem | awk ' | ||
+ | MEMUSAGE2=$(echo " | ||
+ | MEMUSED=$(echo " | ||
+ | TOPMEM=$(ps aux --no-headers | awk ' | ||
- | **Pango Markups in the <txt> tag** | + | # get hard drive usage info |
+ | HD=$(df -hl / | ||
+ | HDUSED=$(df -hl / | ||
+ | HDSIZE=$(df -hl / | ||
+ | TOPHD=$(df -hl / | ||
- | Both the <txt> and <tool> tags support Pango Markups. See: [[https:// | + | # do the genmon |
+ | echo "<icon>$ICON</icon><iconclick>xfce4-taskmanager</iconclick>" | ||
+ | echo "< | ||
+ | echo "<tool>-=CPU $CPULOAD=- | ||
+ | $TOPCPU | ||
- | echo "< | + | -=MEM: $MEMUSED of $MEMUSAGE2=- |
+ | $TOPMEM | ||
- | Refer to the previous link for information on all of the properties that can be set. | + | -=HD usage: $HDUSED |
+ | $TOPHD</ | ||
- | **Refreshing the plugin** | + | exit 0 |
+ | </ | ||
- | The xfce4-genmon-plugin | + | {{: |
- | To refresh the plugin, issue the command: | + | < |
- | | + | Additional genmon scripts can be found in the following online repositories (special thanks to the individual developers for creating them): |
- | where " | + | * [[https:// |
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
- | **Enhanced Gtk3 CSS Styling Capabilities** | + | [[|Back To Top]] |
+ | ---- | ||
- | 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 (~/ | + | ===== Advanced Features ===== |
+ | **Pango Text Markup Support** | ||
- | //**(*dev-only)**// functionality is currently only available in the git tree and has not yet been officially released | + | Both the <txt> and < |
+ | echo "< | ||
+ | | ||
+ | Result: {{: | ||
+ | Refer to the previous link for information on all of the properties that can be set. | ||
- | ===== Screenshots ===== | + | **Refreshing the plugin** |
- | {{: | + | |
- | In this example, the plugin is used to (from left to right): | + | As of version 3.99, the xfce4-genmon-plugin supports xfce4-panel plugin-event functionality to remotely force the plugin to refresh. To refresh |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | - display | + | |
- | - display the WIFI quality | + | |
+ | xfce4-panel --plugin-event=genmon-X: | ||
+ | where " | ||
+ | As of version 4.2.0, an " | ||
- | {{:projects: | + | {{: |
- | In this example, we see the gmail checker script in action: | + | **Enhanced Gtk3 CSS Styling Capabilities** |
- | - plugin display shows icon indicating state of new emails available | + | |
- | - tooltip shows number of new messages, sender/ | + | |
- | - clicking on the icon launches your email program | + | |
+ | 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 (~/ | ||
+ | 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/ | ||
+ | <file genmonTest.sh> | ||
+ | #!/bin/bash | ||
+ | # set Label = Hello | ||
+ | echo "< | ||
+ | echo "< | ||
+ | echo "< | ||
+ | echo "< | ||
+ | </ | ||
- | {{:projects: | + | Result: |
- | 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//) | ||
+ | [[|Back To Top]] | ||
+ | ---- | ||
+ | ===== Screenshots ===== | ||
- | {{:projects: | + | Configuration/ |
- | In this example, we see the google calendar checker script in action: | + | {{:panel-plugins: |
- | | + | |
- | | + | |
- | | + | |
+ | About screen: | ||
- | {{:projects: | + | {{: |
- | {{: | + | |
- | 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]] |
+ | ---- | ||
- | ===== Recent Releases | + | ===== Latest Release |
- | ==== 4.0.1 (2017/ | + | |
- | * Allow pango markup in tooltip as well | + | |
- | * Added some extra sample scripts (twit, google calendar, sysstat) | + | |
- | * Enhanced CSS styling capabilites (see 'CSS Styling.txt' | + | |
- | * Fix progressbar wrong direction | + | |
- | ==== 4.0.0 (2017/02/25) ==== | + | {{rss> |
- | * Fix PangoFontDescription not being able to display initial default string | + | |
- | ==== 3.99 (2016/11/02) ==== | + | [[https://gitlab.xfce.org/panel-plugins/ |
- | * Port to Gtk3 | + | |
- | * Fix font styling to work with Gtk 3.22 | + | |
- | * Add support for " | + | |
- | * Fix default tooltip does not work (bug #11284) | + | |
- | * Add < | + | |
- | ==== 3.4 (2012/ | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
+ | [[|Back to Top]] | ||
- | ===== Recent Changes ===== | + | ---- |
- | {{rss> | + | |
- | ===== Reporting Bugs ===== | + | |
- | Bugs should be reported to the [[http:// | + | |
+ | ===== Source code repository ===== | ||
- | ==== Open Bugs ==== | + | [[https://gitlab.xfce.org/panel-plugins/ |
- | {{rss> | + | |
+ | ---- | ||
- | ===== Getting it ===== | + | ===== Reporting Bugs ===== |
- | 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:// | + | * **[[: |
- | ===== Source code repository ===== | + | [[|Back To Top]] |
- | [[http://git.xfce.org/ | + | ---- |
+ | [[ :xfce:xfce4-panel: |