- mystatusbar[s] = statusbar({ position = "top", name = "mystatusbar" .. s,
- fg = beautiful.fg_normal, bg = beautiful.bg_normal })
- -- Add widgets to the statusbar - order matters
- mystatusbar[s].widgets =
- {
- mytaglist,
- mytasklist,
- mypromptbox,
- mytextbox,
- mylayoutbox[s],
- s == screen.count() and mysystray or nil
- }
- mystatusbar[s].screen = s
+ -- Create a promptbox for each screen
+ mypromptbox[s] = widget({ type = "textbox", align = "left" })
+ -- Create an imagebox widget which will contains an icon indicating which layout we're using.
+ -- We need one layoutbox per screen.
+ mylayoutbox[s] = widget({ type = "imagebox", align = "right" })
+ mylayoutbox[s]:buttons({ button({ }, 1, function () awful.layout.inc(layouts, 1) end),
+ button({ }, 3, function () awful.layout.inc(layouts, -1) end),
+ button({ }, 4, function () awful.layout.inc(layouts, 1) end),
+ button({ }, 5, function () awful.layout.inc(layouts, -1) end) })
+ -- Create a taglist widget
+ mytaglist[s] = awful.widget.taglist.new(s, awful.widget.taglist.label.all, mytaglist.buttons)
+
+ -- Create a tasklist widget
+ mytasklist[s] = awful.widget.tasklist.new(function(c)
+ return awful.widget.tasklist.label.currenttags(c, s)
+ end, mytasklist.buttons)
+
+ -- Create the wibox
+ mywibox[s] = wibox({ position = "top", fg = beautiful.fg_normal, bg = beautiful.bg_normal })
+ -- Add widgets to the wibox - order matters
+ mywibox[s].widgets = { mytaglist[s],
+ mytasklist[s],
+ mypromptbox[s],
+ mybatterybox,
+ mytimebox,
+ mylayoutbox[s],
+ s == screen.count() and mysystray or nil }
+ mywibox[s].screen = s