Skip to content

Commit

Permalink
Merge pull request #421 from nuno-silva/si
Browse files Browse the repository at this point in the history
fix SI/IEC prefixes
  • Loading branch information
streetturtle authored Nov 19, 2023
2 parents a878aba + 2717d15 commit 9a5003d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fs-widget/fs-widget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ local function worker(user_args)
{
text = math.floor(disks[v].used / 1024 / 1024)
.. '/'
.. math.floor(disks[v].size / 1024 / 1024) .. 'GB('
.. math.floor(disks[v].size / 1024 / 1024) .. 'GiB('
.. math.floor(disks[v].perc) .. '%)',
widget = wibox.widget.textbox
},
Expand Down
6 changes: 3 additions & 3 deletions net-speed-widget/net-speed.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ local function convert_to_h(bytes)
dim = 'kb/s'
elseif bits < 1000000000 then
speed = bits/1000000
dim = 'mb/s'
dim = 'Mb/s'
elseif bits < 1000000000000 then
speed = bits/1000000000
dim = 'gb/s'
dim = 'Gb/s'
else
speed = tonumber(bits)
dim = 'b/s'
end
return math.floor(speed + 0.5) .. dim
return math.floor(speed + 0.5) .. ' ' .. dim
end

local function split(string_to_split, separator)
Expand Down

0 comments on commit 9a5003d

Please sign in to comment.