From 167a2f71f6f4ef5d2fd79d8992a40bfba3bcb217 Mon Sep 17 00:00:00 2001 From: zachir Date: Sun, 5 Nov 2023 17:16:48 -0600 Subject: Change how net-speed widget looks --- net-speed-widget/net-speed.lua | 22 +++++----------------- 1 file 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, -- cgit v1.2.3