[awesome] better display options for widgets
This commit is contained in:
parent
36611ec0a4
commit
92d7f55e9e
Binary file not shown.
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
@ -12,15 +12,17 @@ local widgets = {}
|
|||
|
||||
widgets.netdown_icon = wibox.widget.imagebox(iconsdir .. "down.png")
|
||||
widgets.netdown = lain.widget.net({
|
||||
units = 1024^2,
|
||||
settings = function()
|
||||
widget:set_markup(markup.fontfg(theme.font, theme.colors.green, math.floor(net_now.received+0.5) .. "KiB/s "))
|
||||
widget:set_markup(markup.fontfg(theme.font, theme.colors.green, net_now.received .. "MiB/s "))
|
||||
end
|
||||
})
|
||||
|
||||
widgets.netup_icon = wibox.widget.imagebox(iconsdir .. "up.png")
|
||||
widgets.netup = lain.widget.net({
|
||||
units = 1024^2,
|
||||
settings = function()
|
||||
widget:set_markup(markup.fontfg(theme.font, theme.colors.red, math.floor(net_now.sent+0.5) .. "KiB/s "))
|
||||
widget:set_markup(markup.fontfg(theme.font, theme.colors.red, net_now.sent .. "MiB/s "))
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -34,7 +36,7 @@ widgets.mem = lain.widget.mem({
|
|||
widgets.cpu_icon = wibox.widget.imagebox(iconsdir .. "cpu.png")
|
||||
widgets.cpu = lain.widget.cpu({
|
||||
settings = function()
|
||||
widget:set_markup(markup.fontfg(theme.font, theme.colors.cyan, cpu_now.usage .. "% "))
|
||||
widget:set_markup(markup.fontfg(theme.font, theme.colors.cyan, string.format("%02d", cpu_now.usage) .. "% "))
|
||||
end
|
||||
})
|
||||
|
||||
|
|
Reference in a new issue