diff --git a/public/config-awesome-4-rc.lua b/public/config-awesome-4-rc.lua index d62b520..e9bae9a 100644 --- a/public/config-awesome-4-rc.lua +++ b/public/config-awesome-4-rc.lua @@ -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