The xfce4-genmon-plugin (GenMon) provides a plugin for xfce4-panel that cyclically spawns a script or program, captures its output and displays the result into the panel.
Important
Version 4.2.0 introduced <css>
tag support with commit b631ca03 which merged PR4. This was crucial for the scripts below and hence you should ensure your installed version is at least version 4.2.0. At time of publishing, Debian is known to be out of date due to an upstream packaging hold and should be built from source.
This script retrieves the current temperature of the GPU using the NVIDIA nvidia-smi
command and calculates an interpolated color based on the temperature range. The color is then used to represent the temperature visually in the progress bar in the panel.
The script allows for the customization of temperature thresholds and color values, enabling users to adjust the visual representation according to their preferences. The target, slowdown, shutdown, and max temperature threshold values are retrieved directly from the GPU via nvidia-smi
.
See the README for more information.
Q: The plugin isn't working like in the gif? What went wrong?
A: There's many reasons this could happen. Please ensure:
- Your xfce4-genmon-plugin package is at least version 4.2.0
- If you built xfce4-genmon-plugin from source did you install to an appropriate directory? Try
./configure --prefix=/usr
- Did you make sure to chmod the script to be executable?
chmod +x /path/to/script.sh
- Did you restart the panel after installing the new plugin?
xfce4-plugin -r
Q: How do i know what CSS to use?
A: There are some useful starting points available in the gitlab repo inside the CSS Styling.txt file. Beyond that, I found the GTK Inspector extremely helpful in attempting to copy the theme of an existing indicator.
Q: What's a sane refresh period to use?
A: That's entirely up to your preference and your systems resources. Keep an eye on your CPU load and adjust as necessary.
Tip
You can relaunch your panel with an environment variable to get access to GTK Inspector
xfce4-panel -q
GTK_DEBUG=interactive xfce4-panel -r
Once you are done, kill it again and relaunch without the environment variable.