diff options
| author | Ultrabug <ultrabug@gentoo.org> | 2015-04-05 11:37:45 +0200 |
|---|---|---|
| committer | Ultrabug <ultrabug@gentoo.org> | 2015-04-05 11:37:45 +0200 |
| commit | 0f0140f019a7a68679a6524c2af7614c571cdcfb (patch) | |
| tree | aec70291ce477e4a5cb197883cd24abb70ca3871 | |
| parent | 8a2b87d96eec67f46f0a29c3921dca9b236dc2a8 (diff) | |
quick QA on nvidia_temp module
| -rwxr-xr-x | py3status/modules/nvidia_temp.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/py3status/modules/nvidia_temp.py b/py3status/modules/nvidia_temp.py index b9340e9..ba17d27 100755 --- a/py3status/modules/nvidia_temp.py +++ b/py3status/modules/nvidia_temp.py @@ -1,19 +1,18 @@ # -*- coding: utf-8 -*- - """ -Module for displaying NVIDIA GPU temperature - -Requires: - - nvidia-smi +Display NVIDIA GPU temperature. Configuration parameters: - cache_timeout: how often we refresh this module in seconds - - color_good: the color used if everything is OK. - color_bad: the color used if the temperature can't be read. + - color_good: the color used if everything is OK. - format_prefix: a prefix for the output. - format_units: the temperature units. Will appear at the end. - separator: the separator char between temperatures (only if more than one GPU) +Requires: + - nvidia-smi + @author jmdana <https://github.com/jmdana> @license BSD """ @@ -25,11 +24,14 @@ from time import time TEMP_RE = re.compile(r"Current Temp\s+:\s+([0-9]+)") + class Py3status: + """ + """ # configuration parameters cache_timeout = 10 - color_good = None color_bad = None + color_good = None format_prefix = "GPU: " format_units = "°C" separator = '|' @@ -66,7 +68,7 @@ class Py3status: response = { 'cached_until': time() + self.cache_timeout, 'color': color, - 'full_text': output, + 'full_text': output } return response |
