Quantcast
Channel: Linux.org.ru: Форум
Viewing all articles
Browse latest Browse all 108361

не обновляется виджет в осоме

$
0
0

привет лоровцы, вопрос - вывел индикатор заряда батареи, а оно не хочет обновляться, подскажите что не так?

349 bat_perc = lain.widgets.bat({
350     settings = function()
351         widget:set_markup(space3 .. bat_now.perc .."%" .. markup.font("Tamsyn 4", " "))
352     end
353 })
354 bat_time = lain.widgets.bat({
355     settings = function()
356         widget:set_markup(space3 .. "~ " .. bat_now.time .. markup.font("Tamsyn 4", " "))
357     end
358 })
359 
360 widget_bat = wibox.widget.imagebox()
361 widget_bat:set_image(beautiful.widget_bat)
362 
363 batwidget = wibox.widget.background()
364 batwidget:set_widget(bat_perc)
365 batwidget:set_bgimage(beautiful.widget_display)
366 
367 local index = 1
368 local loop_widgets = { bat_perc, bat_time }
369 
370 batwidget:buttons(awful.util.table.join(awful.button({}, 1,
371     function () 
372         index = index % #loop_widgets + 1
373         batwidget:set_widget(loop_widgets[index])
374     end
375 )))

P.S.

awesome v3.5.9 (Mighty Ravendark)
 • Build: Mar 30 2016 22:58:57 for x86_64 by gcc version 4.9.3 (@sandbox)
 • Compiled against Lua 5.1.5 (running with Lua 5.1)
 • D-Bus support: ✔

 , ,


Viewing all articles
Browse latest Browse all 108361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>