@@ -223,12 +223,12 @@ def temperature():
223
223
)
224
224
225
225
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 ):
227
227
theme_gpu_data = config .THEME_DATA ['STATS' ]['GPU' ]
228
+
228
229
gpu_percent_graph_data = theme_gpu_data ['PERCENTAGE' ]['GRAPH' ]
229
230
gpu_percent_radial_data = theme_gpu_data ['PERCENTAGE' ]['RADIAL' ]
230
231
gpu_percent_text_data = theme_gpu_data ['PERCENTAGE' ]['TEXT' ]
231
-
232
232
if math .isnan (load ):
233
233
load = 0
234
234
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):
260
260
logger .warning ("Your GPU temperature is not supported yet" )
261
261
gpu_temp_text_data ['SHOW' ] = False
262
262
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
+
263
269
# logger.debug(f"GPU Load: {load}")
264
270
display_themed_progress_bar (gpu_percent_graph_data , load )
265
271
@@ -299,12 +305,20 @@ def display_gpu_stats(load, memory_percentage, memory_used_mb, temperature):
299
305
unit = "°C"
300
306
)
301
307
308
+ display_themed_value (
309
+ theme_data = gpu_fps_text_data ,
310
+ value = int (fps ),
311
+ min_size = 4 ,
312
+ unit = " FPS"
313
+ )
314
+
302
315
303
316
class Gpu :
304
317
@staticmethod
305
318
def stats ():
306
319
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 )
308
322
309
323
@staticmethod
310
324
def is_available ():
0 commit comments