]> git.rmz.io Git - dotfiles.git/commitdiff
split each widget into its own file
authorSamir Benmendil <samir.benmendil@gmail.com>
Thu, 13 Jun 2013 01:36:54 +0000 (03:36 +0200)
committerSamir Benmendil <samir.benmendil@gmail.com>
Thu, 13 Jun 2013 01:39:35 +0000 (03:39 +0200)
awesome/topbar.lua
awesome/widgets/volume_widget.lua [moved from awesome/widgets.lua with 97% similarity]

index 84a7b5a29edecd2e4417d5d4a3f027e50c26ee64..58c01953877870b8c2353be808a750cc8b6ef4a6 100644 (file)
@@ -1,12 +1,12 @@
 -- Widget and layout library
-wibox = require("wibox")
--- my widgets
-require("widgets")
+local wibox = require("wibox")
 
--- {{{ Wibox
+-- my widgets
+local volume_widget  = require("widgets/volume_widget")
 -- Create a textclock widget
 mytextclock = awful.widget.textclock()
 
+-- {{{ Wibox
 -- Create a wibox for each screen and add it
 mywibox = {}
 mypromptbox = {}
@@ -86,8 +86,7 @@ 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
-    --right_layout:add(APW)
-    right_layout:add(volwidget)
+    right_layout:add(volume_widget)
     right_layout:add(mytextclock)
     right_layout:add(mylayoutbox[s])
 
similarity index 97%
rename from awesome/widgets.lua
rename to awesome/widgets/volume_widget.lua
index 420a12f9463f11d565e5ff59fca70c871e3c95bf..fc9c82e1fdd94c84bf3e3132ba9b5781ec4e21c2 100644 (file)
@@ -1,6 +1,7 @@
 local vicious = require("vicious")
 vicious.contrib = require("vicious.contrib")
 local utils = require("utils")
+local volwidget = { }
 
 --{{{ Volume progressbar
 volwidget = awful.widget.progressbar()
@@ -39,3 +40,5 @@ volwidget:buttons(awful.util.table.join( awful.button({ }, 1, function () utils.
         end)
     ))
 --}}}
+
+return volwidget