]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/topbar.lua
replace volume progressbar with text widget
[dotfiles.git] / awesome / topbar.lua
index 84a7b5a29edecd2e4417d5d4a3f027e50c26ee64..e6fa42365873473bb609d0ae4ef783118fc985d2 100644 (file)
@@ -1,12 +1,20 @@
+-- utils
+local utils = require("utils")
+
 -- Widget and layout library
 -- Widget and layout library
-wibox = require("wibox")
+local wibox = require("wibox")
+
 -- my widgets
 -- my widgets
-require("widgets")
+local volume_widget = require("widgets/volume_widget")
+if utils.host == "chronos" then
+    local battery_widget = require("widgets/battery_widget")
+end
+local network_widget = require("widgets/network_widget")
 
 
--- {{{ Wibox
 -- Create a textclock widget
 mytextclock = awful.widget.textclock()
 
 -- Create a textclock widget
 mytextclock = awful.widget.textclock()
 
+-- {{{ Wibox
 -- Create a wibox for each screen and add it
 mywibox = {}
 mypromptbox = {}
 -- Create a wibox for each screen and add it
 mywibox = {}
 mypromptbox = {}
@@ -86,8 +94,11 @@ for s = 1, screen.count() do
     -- Widgets that are aligned to the right
     local right_layout = wibox.layout.fixed.horizontal()
     if s == 1 then right_layout:add(wibox.widget.systray()) end
     -- Widgets that are aligned to the right
     local right_layout = wibox.layout.fixed.horizontal()
     if s == 1 then right_layout:add(wibox.widget.systray()) end
-    --right_layout:add(APW)
-    right_layout:add(volwidget)
+    right_layout:add(network_widget)
+    right_layout:add(volume_widget)
+    if utils.host == "chronos" then
+        right_layout:add(battery_widget)
+    end
     right_layout:add(mytextclock)
     right_layout:add(mylayoutbox[s])
 
     right_layout:add(mytextclock)
     right_layout:add(mylayoutbox[s])