mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-25 03:08:34 +02:00
widgets: reduce CPU usage
This commit is contained in:
parent
d1d27691f0
commit
1c96367c6a
1 changed files with 5 additions and 5 deletions
|
@ -24,7 +24,7 @@ vicious.register(cpuwidget, vicious.widgets.cpu,
|
||||||
function (widget, args)
|
function (widget, args)
|
||||||
return string.format('<span color="' .. beautiful.fg_widget_value .. '">%2d%%</span>',
|
return string.format('<span color="' .. beautiful.fg_widget_value .. '">%2d%%</span>',
|
||||||
args[1])
|
args[1])
|
||||||
end, 2)
|
end, 7)
|
||||||
local cpuicon = widget({ type = "imagebox" })
|
local cpuicon = widget({ type = "imagebox" })
|
||||||
cpuicon.image = image(awful.util.getdir("config") .. "/icons/widgets/cpu.png")
|
cpuicon.image = image(awful.util.getdir("config") .. "/icons/widgets/cpu.png")
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ if config.hostname == "guybrush" then
|
||||||
return string.format('<span color="' .. color ..
|
return string.format('<span color="' .. color ..
|
||||||
'">%s%d%%</span>', args[1], current)
|
'">%s%d%%</span>', args[1], current)
|
||||||
end,
|
end,
|
||||||
61, "BAT1")
|
59, "BAT1")
|
||||||
end
|
end
|
||||||
local baticon = widget({ type = "imagebox" })
|
local baticon = widget({ type = "imagebox" })
|
||||||
baticon.image = image(awful.util.getdir("config") .. "/icons/widgets/bat.png")
|
baticon.image = image(awful.util.getdir("config") .. "/icons/widgets/bat.png")
|
||||||
|
@ -111,7 +111,7 @@ vicious.register(netup, vicious.widgets.net,
|
||||||
local memwidget = widget({ type = "textbox" })
|
local memwidget = widget({ type = "textbox" })
|
||||||
vicious.register(memwidget, vicious.widgets.mem,
|
vicious.register(memwidget, vicious.widgets.mem,
|
||||||
'<span color="' .. beautiful.fg_widget_value .. '">$1%</span>',
|
'<span color="' .. beautiful.fg_widget_value .. '">$1%</span>',
|
||||||
13)
|
19)
|
||||||
local memicon = widget({ type = "imagebox" })
|
local memicon = widget({ type = "imagebox" })
|
||||||
memicon.image = image(awful.util.getdir("config") .. "/icons/widgets/mem.png")
|
memicon.image = image(awful.util.getdir("config") .. "/icons/widgets/mem.png")
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ volicon.image = image(awful.util.getdir("config") .. "/icons/widgets/vol.png")
|
||||||
local volwidget = widget({ type = "textbox" })
|
local volwidget = widget({ type = "textbox" })
|
||||||
vicious.register(volwidget, vicious.widgets.volume,
|
vicious.register(volwidget, vicious.widgets.volume,
|
||||||
'<span color="' .. beautiful.fg_widget_value .. '">$2 $1%</span>',
|
'<span color="' .. beautiful.fg_widget_value .. '">$2 $1%</span>',
|
||||||
2, "Master")
|
17, "Master")
|
||||||
volume = loadrc("volume", "vbe/volume")
|
volume = loadrc("volume", "vbe/volume")
|
||||||
volwidget:buttons(awful.util.table.join(
|
volwidget:buttons(awful.util.table.join(
|
||||||
awful.button({ }, 1, volume.mixer),
|
awful.button({ }, 1, volume.mixer),
|
||||||
|
@ -156,7 +156,7 @@ vicious.register(fswidget, vicious.widgets.fs,
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end, 10)
|
end, 53)
|
||||||
|
|
||||||
local systray = widget({ type = "systray" })
|
local systray = widget({ type = "systray" })
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue