awesome/my.lua
changeset 18 f9712f62d202
parent 17 171cba5d3e3a
equal deleted inserted replaced
17:171cba5d3e3a 18:f9712f62d202
   145    local w = wibox.widget.textbox()
   145    local w = wibox.widget.textbox()
   146    -- w:set_vertical(true)
   146    -- w:set_vertical(true)
   147    w.width = 150
   147    w.width = 150
   148    w:set_align('center')
   148    w:set_align('center')
   149    local format = '<tt> '
   149    local format = '<tt> '
   150    for _, device in ipairs(devices) do
   150    for device, name in pairs(devices) do
   151       format = format .. device .. ': ${' .. device .. ' total_mb} '
   151       format = format .. '[' .. name .. ' ${' .. device .. ' total_mb}] '
   152    end
   152    end
   153    format = format .. '</tt>'
   153    format = format .. '</tt>'
   154 
   154 
   155    vicious.register(w, vicious.widgets.dio, format, 1)
   155    vicious.register(w, vicious.widgets.dio, format, 1)
   156    return w
   156    return w