From 276f9a4e1f00f24d0a00615e74e4c0f5eb6e9c83 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 23 Jul 2015 10:56:57 -0300 Subject: Move widgets load code to widgets.lua --- config.dot/awesome.link/rc.lua | 17 +++-------------- config.dot/awesome.link/widgets.lua | 11 +++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config.dot/awesome.link/rc.lua b/config.dot/awesome.link/rc.lua index 8520d00..9669bbc 100644 --- a/config.dot/awesome.link/rc.lua +++ b/config.dot/awesome.link/rc.lua @@ -59,17 +59,6 @@ layouts = dofile(configdir .. "/functions.lua") -- }}} --- {{{ Widgets -dofile(configdir .. "/leds.lua") -dofile(configdir .. "/volume.lua") -dofile(configdir .. "/battery.lua") - -if file_exists(homedir .. "/.custom/awesome/awesompd.lua") then - awesompd = true - dofile(configdir .. "/awesompd.lua") -end --- }}} - -- {{{ Tags -- Define a tag table which hold all screen tags. tags = {} @@ -124,6 +113,9 @@ mytasklist.buttons = awful.util.table.join( if client.focus then client.focus:raise() end end)) +-- Widgets +dofile(configdir .. "/widgets.lua") + for s = 1, screen.count() do -- Create a promptbox for each screen mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright }) @@ -143,9 +135,6 @@ for s = 1, screen.count() do return awful.widget.tasklist.label.currenttags(c, s) end, mytasklist.buttons) - -- Load widgets - dofile(configdir .. "/widgets.lua") - -- Create the wibox --mywibox[s] = awful.wibox({ position = "top", screen = s }) mywibox[s] = awful.wibox({ position = "top", screen = s, height = "16" }) diff --git a/config.dot/awesome.link/widgets.lua b/config.dot/awesome.link/widgets.lua index 6117328..a45dfbf 100644 --- a/config.dot/awesome.link/widgets.lua +++ b/config.dot/awesome.link/widgets.lua @@ -1,3 +1,14 @@ +-- {{{ Misc widgets +dofile(configdir .. "/leds.lua") +dofile(configdir .. "/volume.lua") +dofile(configdir .. "/battery.lua") + +if file_exists(homedir .. "/.custom/awesome/awesompd.lua") then + awesompd = true + dofile(configdir .. "/awesompd.lua") +end +-- }}} + --{{---| Text clock widget |------------------------------------------------------------------------------ mytextclock = awful.widget.textclock({ align = "right" }) -- cgit v1.2.3