From d79a3d0f5cb72039de44a4b92146b75f46b8c8ee Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 13 Jun 2014 16:22:50 +0200 Subject: [PATCH] widgets: enable battery widget on zoro --- rc/widgets.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rc/widgets.lua b/rc/widgets.lua index 81c0bf5..27d9157 100644 --- a/rc/widgets.lua +++ b/rc/widgets.lua @@ -88,7 +88,9 @@ cpuicon.image = image(beautiful.icons .. "/widgets/cpu.png") -- Battery local batwidget = { widget = "" } -if config.hostname == "guybrush" then +if awful.util.table.hasitem({"guybrush", "zoro"}, config.hostname) then + local bat = "BAT0" + if config.hostname == "guybrush" then bat = "BAT1" end batwidget.widget = widget({ type = "textbox" }) vicious.register(batwidget.widget, vicious.widgets.bat, function (widget, args) @@ -114,7 +116,7 @@ if config.hostname == "guybrush" then return string.format('%s%d%%', args[1], current) end, - 59, "BAT1") + 59, bat) end local baticon = widget({ type = "imagebox" }) baticon.image = image(beautiful.icons .. "/widgets/bat.png")