diff options
-rw-r--r-- | net-speed-widget/net-speed.lua | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/net-speed-widget/net-speed.lua b/net-speed-widget/net-speed.lua index 31c701f..5663bd0 100644 --- a/net-speed-widget/net-speed.lua +++ b/net-speed-widget/net-speed.lua @@ -23,19 +23,19 @@ local function convert_to_h(bytes) local bits = bytes * 8 if bits < 1000 then speed = bits - dim = 'b' + dim = 'B/s' elseif bits < 1000000 then speed = bits/1000 - dim = 'k' + dim = 'KB/s' elseif bits < 1000000000 then speed = bits/1000000 - dim = 'm' + dim = 'MB/s' elseif bits < 1000000000000 then speed = bits/1000000000 - dim = 'g' + dim = 'GB/s' else speed = tonumber(bits) - dim = 'b' + dim = 'b/s' end return math.floor(speed + 0.5) .. dim end @@ -68,22 +68,10 @@ local function worker(user_args) font = font, widget = wibox.widget.textbox }, - --[[ - { - image = ICONS_DIR .. 'down.svg', - widget = wibox.widget.imagebox - }, - { - image = ICONS_DIR .. 'up.svg', - widget = wibox.widget.imagebox - }, - --]] - ---[[ { text = "⬆️⬇️", widget = wibox.widget.textbox }, - --]] { id = 'tx_speed', forced_width = width, |