awesome : inutile d'ajouter le tooltip en boucle

nixos-19.09
Jean-Pierre PRUNARET 8 years ago
parent f7bd484863
commit 87e16c5fe7

@ -230,7 +230,7 @@ local iostat_tooltiptext = ""
-- Widget de monitoring de l'activité des disques https://awesomewm.org/recipes/watch/
-- disk I/O using iostat from sysstat utilities
local iotable = {}
local iostat = awful.widget.watch("iostat -dm -y -z 1 1", 2, -- in Kb, use -dm for Mb
local iostat = awful.widget.watch("iostat -dm -y 1 1", 2, -- in Kb, use -dm for Mb
function(widget, stdout)
for line in stdout:match("(sd.*)\n"):gmatch("(.-)\n") do
local device, tps, read_s, wrtn_s, read, wrtn =
@ -248,18 +248,18 @@ local iostat = awful.widget.watch("iostat -dm -y -z 1 1", 2, -- in Kb, use -dm f
-- customize here
--widget:set_text("sda: "..iotable["sda"][2].."/"..iotable["sda"][3]) -- read_s/wrtn_s
widget:set_text("iostat")
widget_t = awful.tooltip({
--objects = { },
timer_function = function()
return iostat_tooltiptext
end,
})
widget_t:add_to_object(widget)
end
)
iostat_t = awful.tooltip({
--objects = { },
timer_function = function()
return iostat_tooltiptext
end,
})
iostat_t:add_to_object(iostat)
-- tris d'un tableau par la clef https://stackoverflow.com/questions/15706270/sort-a-table-in-lua
function spairs(t, order)
-- collect the keys

Loading…
Cancel
Save