@@ -223,12 +223,12 @@ def temperature():
223223 )
224224
225225
226- def display_gpu_stats (load , memory_percentage , memory_used_mb , temperature ):
226+ def display_gpu_stats (load , memory_percentage , memory_used_mb , temperature , fps ):
227227 theme_gpu_data = config .THEME_DATA ['STATS' ]['GPU' ]
228+
228229 gpu_percent_graph_data = theme_gpu_data ['PERCENTAGE' ]['GRAPH' ]
229230 gpu_percent_radial_data = theme_gpu_data ['PERCENTAGE' ]['RADIAL' ]
230231 gpu_percent_text_data = theme_gpu_data ['PERCENTAGE' ]['TEXT' ]
231-
232232 if math .isnan (load ):
233233 load = 0
234234 if gpu_percent_graph_data ['SHOW' ] or gpu_percent_text_data ['SHOW' ] or gpu_percent_radial_data ['SHOW' ]:
@@ -260,6 +260,12 @@ def display_gpu_stats(load, memory_percentage, memory_used_mb, temperature):
260260 logger .warning ("Your GPU temperature is not supported yet" )
261261 gpu_temp_text_data ['SHOW' ] = False
262262
263+ gpu_fps_text_data = theme_gpu_data ['FPS' ]['TEXT' ]
264+ if fps < 0 :
265+ if gpu_fps_text_data ['SHOW' ]:
266+ logger .warning ("Your GPU FPS is not supported yet" )
267+ gpu_fps_text_data ['SHOW' ] = False
268+
263269 # logger.debug(f"GPU Load: {load}")
264270 display_themed_progress_bar (gpu_percent_graph_data , load )
265271
@@ -299,12 +305,20 @@ def display_gpu_stats(load, memory_percentage, memory_used_mb, temperature):
299305 unit = "°C"
300306 )
301307
308+ display_themed_value (
309+ theme_data = gpu_fps_text_data ,
310+ value = int (fps ),
311+ min_size = 4 ,
312+ unit = " FPS"
313+ )
314+
302315
303316class Gpu :
304317 @staticmethod
305318 def stats ():
306319 load , memory_percentage , memory_used_mb , temperature = sensors .Gpu .stats ()
307- display_gpu_stats (load , memory_percentage , memory_used_mb , temperature )
320+ fps = sensors .Gpu .fps ()
321+ display_gpu_stats (load , memory_percentage , memory_used_mb , temperature , fps )
308322
309323 @staticmethod
310324 def is_available ():
0 commit comments