mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-24 10:48:35 +02:00
widgets: don't use a graph for CPU
I don't really use it.
This commit is contained in:
parent
e93cb758eb
commit
f6b4a19dbb
1 changed files with 8 additions and 17 deletions
|
@ -13,21 +13,12 @@ vicious.register(datewidget, vicious.widgets.date,
|
||||||
|
|
||||||
-- CPU usage
|
-- CPU usage
|
||||||
local cpuwidget = widget({ type = "textbox" })
|
local cpuwidget = widget({ type = "textbox" })
|
||||||
cpuwidget.text = '<span font="Terminus 8" color="' .. beautiful.fg_widget_label .. '">CPU: </span>'
|
vicious.register(cpuwidget, vicious.widgets.cpu,
|
||||||
local cpugraph = awful.widget.graph()
|
|
||||||
cpugraph:set_width(45):set_height(12)
|
|
||||||
cpugraph:set_border_color(beautiful.fg_widget_border)
|
|
||||||
cpugraph:set_gradient_angle(0):set_gradient_colors({
|
|
||||||
beautiful.fg_widget_start, beautiful.fg_widget_center, beautiful.fg_widget_end
|
|
||||||
})
|
|
||||||
vicious.register(cpugraph, vicious.widgets.cpu, "$1")
|
|
||||||
local cpuvalue = widget({ type = "textbox" })
|
|
||||||
vicious.register(cpuvalue, vicious.widgets.cpu,
|
|
||||||
function (widget, args)
|
function (widget, args)
|
||||||
return string.format('<span font="Terminus 8" color="' ..
|
return string.format('<span font="Terminus 8" color="' .. beautiful.fg_widget_label .. '">CPU: </span>' ..
|
||||||
beautiful.fg_widget_value ..
|
'<span font="Terminus 8" color="' .. beautiful.fg_widget_value .. '">%3d%%</span>',
|
||||||
'"> %2d%%</span>', args[1])
|
args[1])
|
||||||
end)
|
end, 2)
|
||||||
|
|
||||||
-- Battery
|
-- Battery
|
||||||
local batwidget = nil
|
local batwidget = nil
|
||||||
|
@ -60,7 +51,7 @@ volwidget:buttons(awful.util.table.join(
|
||||||
|
|
||||||
local systray = widget({ type = "systray" })
|
local systray = widget({ type = "systray" })
|
||||||
|
|
||||||
-- {{{ Wibox initialisation
|
-- Wibox initialisation
|
||||||
local wibox = {}
|
local wibox = {}
|
||||||
local promptbox = {}
|
local promptbox = {}
|
||||||
local layoutbox = {}
|
local layoutbox = {}
|
||||||
|
@ -135,12 +126,12 @@ for s = 1, screen.count() do
|
||||||
separator, promptbox[s],
|
separator, promptbox[s],
|
||||||
layout = awful.widget.layout.horizontal.leftright
|
layout = awful.widget.layout.horizontal.leftright
|
||||||
},
|
},
|
||||||
onfirst(systray), onfirst(seperator),
|
onfirst(systray), onfirst(separator),
|
||||||
datewidget, separator,
|
datewidget, separator,
|
||||||
onsecond(volwidget), onsecond(separator),
|
onsecond(volwidget), onsecond(separator),
|
||||||
onsecond(batwidget), onsecond(batwidget and separator or nil),
|
onsecond(batwidget), onsecond(batwidget and separator or nil),
|
||||||
onfirst(memwidget), onfirst(separator),
|
onfirst(memwidget), onfirst(separator),
|
||||||
onfirst(cpuvalue), onfirst(cpugraph.widget), onfirst(cpuwidget), onfirst(separator),
|
onfirst(cpuwidget), onfirst(separator),
|
||||||
tasklist[s], separator,
|
tasklist[s], separator,
|
||||||
layout = awful.widget.layout.horizontal.rightleft }
|
layout = awful.widget.layout.horizontal.rightleft }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue