[awesome] better display options for widgets

This commit is contained in:
Simon Bruder 2019-02-16 21:16:41 +00:00
parent 36611ec0a4
commit 92d7f55e9e
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
2 changed files with 5 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -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
})