From: Samir Benmendil Date: Fri, 14 Jun 2013 20:10:31 +0000 (+0200) Subject: only load power widget on chronos X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/4ab70828c947be1e0367ba6fcb017802d6589b9a only load power widget on chronos --- diff --git a/awesome/topbar.lua b/awesome/topbar.lua index c18303b..eea23d6 100644 --- a/awesome/topbar.lua +++ b/awesome/topbar.lua @@ -1,9 +1,14 @@ +-- utils +local utils = require("utils") + -- Widget and layout library local wibox = require("wibox") -- my widgets local volume_widget = require("widgets/volume_widget") -local battery_widget = require("widgets/battery_widget") +if utils.host == "chronos" then + local battery_widget = require("widgets/battery_widget") +end -- Create a textclock widget mytextclock = awful.widget.textclock() @@ -88,7 +93,9 @@ for s = 1, screen.count() do local right_layout = wibox.layout.fixed.horizontal() if s == 1 then right_layout:add(wibox.widget.systray()) end right_layout:add(volume_widget) - right_layout:add(battery_widget) + if utils.host == "chronos" then + right_layout:add(battery_widget) + end right_layout:add(mytextclock) right_layout:add(mylayoutbox[s])