Skip to content

Commit

Permalink
adjust vram percentage display to show integer values only
Browse files Browse the repository at this point in the history
  • Loading branch information
TanvirOnGH committed May 10, 2024
1 parent 54aefc6 commit 1143f15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,10 @@ function system.pformatted.vram(crit)

return function()
local vram_info = system.vram_usage()
local vram_usage = vram_info.used / vram_info.total * 100
local vram_usage = math.floor(vram_info.used / vram_info.total * 100)
return {
value = vram_usage / 100,
text = "VRAM: " .. string.format("%.2f%%", vram_usage),
text = "VRAM: " .. vram_usage .. "%",
alert = vram_usage > crit,
}
end
Expand Down

0 comments on commit 1143f15

Please sign in to comment.