Commit 68542fd6 authored by Léo Grange's avatar Léo Grange
Browse files

use declarative widgets and update APW

parent d15937ed
Subproject commit 7822e083917316567004e919553a33e77fd18641
Subproject commit 57386b6a320b7d0912ace22416b8b3afa2d9bc8e
......@@ -224,13 +224,14 @@ vicious.register(tempwidget, vicious.widgets.thermal, temp_update, 3, "thermal_z
-- Initialize CPU widget
cpuwidget = awful.widget.graph()
-- -- Graph properties
cpuwidget:set_width(50)
cpuwidget:set_background_color("#494B4F")
cpuwidget:set_color({ type = "linear", from = { 0, 0 }, to = { 0, 15 }, stops = { {0, "#FF5656"}, {0.5, "#88A175"},
{1, "#AECF96" }}})
cpuwidget:buttons(awful.button({ }, 1, function (c) awful.util.spawn("qps") end))
cpuwidget = wibox.widget {
forced_width = 50,
background_color = "#494B4F",
color = {type = 'linear', from = {0, 20}, to = {0, 0},
stops = { {0, "#80FF80"}, {0.5, "#FFFF40"}, {0.9, "#FF2020"}} },
buttons = awful.button({ }, 1, function (c) awful.util.spawn("qps") end),
widget = wibox.widget.graph,
}
-- Register widget
vicious.register(cpuwidget, vicious.widgets.cpu, "$1", 3)
......@@ -238,46 +239,47 @@ vicious.register(cpuwidget, vicious.widgets.cpu, "$1", 3)
-- Initialize RAM load widget
ramwidget = wibox.widget {
{
id = 'progress',
max_value = 1,
value = 0.95,
forced_height = 8,
forced_width = 10,
background_color = "#5A5A5A",
color = {type = 'linear', from = {0, 0}, to = {20, 0},
--stops = { {0, "#FF0000"}, {0.5, "#00FF00"}, {1, "#0000FF"}} },
stops = { {0, "#80FF80"}, {0.5, "#FFFF40"}, {0.9, "#FF2020"}} },
widget = wibox.widget.progressbar,
},
direction = 'east',
layout = wibox.container.rotate,
}
-- progress bar properties
--ramwidget:set_color({ type = "linear", from = { 0, 0 }, to = { 0, 10 },
--stops = { {1, "#80FF80"}, {0.9, "#FFFF40"}, {0.6, "#FF4040"}}})
-- tooltip
ramwidget_t = awful.tooltip({ objects = { ramwidget }, })
ram_update = function(widget, args)
widget:set_value(args[1])
ramwidget_t:set_text("RAM: " .. args[2] .. "MB/" .. args[3] .. "MB" )
return args[1]
end
-- Register widget
--vicious.register(ramwidget, vicious.widgets.mem, ram_update, 5, "BAT0")
vicious.register(ramwidget.progress, vicious.widgets.mem, ram_update, 5, "BAT0")
-- Initialize Battery widget
batwidget = awful.widget.progressbar()
-- progress bar properties
batwidget:set_width(8)
batwidget:set_height(10)
batwidget:set_vertical(true)
batwidget:set_background_color("#A04010")
batwidget:set_color({ type = "linear", from = { 0, 0 }, to = { 0,10 },
stops = { {0, "#80FF80"}, {1, "#56FF56"}}})
batwidget = wibox.widget {
{
id = 'progress',
max_value = 1,
forced_height = 8,
forced_width = 10,
background_color = "#A04010",
color = "#80FF80",
widget = wibox.widget.progressbar,
},
direction = 'east',
layout = wibox.container.rotate,
}
-- Register widget
vicious.register(batwidget, vicious.widgets.bat, "$2", 61, "BAT0")
vicious.register(batwidget.progress, vicious.widgets.bat, "$2", 61, "BAT0")
batloadwidget = wibox.widget.textbox()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment