doc: Support multiple screens in the "default look" template.
This commit is contained in:
parent
6b7ecc51f8
commit
e55ea2b0d5
|
@ -3,17 +3,26 @@ local wibox = require("wibox")
|
|||
local beautiful = require("beautiful")
|
||||
require("_date")
|
||||
|
||||
-- Create the same number of tags as the default config
|
||||
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1], awful.layout.layouts[1])
|
||||
local mykeyboardlayout = awful.widget.keyboardlayout()
|
||||
local mytextclock = wibox.widget.textclock()
|
||||
local mylayoutbox = awful.widget.layoutbox(screen[1])
|
||||
local mytaglist = awful.widget.taglist(screen[1], awful.widget.taglist.filter.all, {})
|
||||
local mytasklist = awful.widget.tasklist(screen[1], awful.widget.tasklist.filter.currenttags, {})
|
||||
local mypromptbox = wibox.widget.textbox("")
|
||||
local ret = nil
|
||||
|
||||
local wb = awful.wibar { position = "top" }
|
||||
wb:setup {
|
||||
for i = 1, screen.count() do
|
||||
local s = screen[i]
|
||||
|
||||
-- Create the same number of tags as the default config
|
||||
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
|
||||
local mykeyboardlayout = awful.widget.keyboardlayout()
|
||||
local mytextclock = wibox.widget.textclock()
|
||||
local mylayoutbox = awful.widget.layoutbox(s)
|
||||
local mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, {})
|
||||
local mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, {})
|
||||
local mypromptbox = wibox.widget.textbox("")
|
||||
|
||||
local wb = awful.wibar {
|
||||
position = "top",
|
||||
screen = s
|
||||
}
|
||||
|
||||
wb:setup {
|
||||
layout = wibox.layout.align.horizontal,
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
|
@ -43,10 +52,9 @@ wb:setup {
|
|||
mytextclock,
|
||||
mylayoutbox,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
client.connect_signal("request::titlebars", function(c)
|
||||
client.connect_signal("request::titlebars", function(c)
|
||||
local top_titlebar = awful.titlebar(c, {
|
||||
height = 20,
|
||||
bg_normal = beautiful.bg_normal,
|
||||
|
@ -74,11 +82,9 @@ client.connect_signal("request::titlebars", function(c)
|
|||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
end)
|
||||
end)
|
||||
|
||||
require("gears.timer").run_delayed_calls_now()
|
||||
|
||||
return {
|
||||
ret = ret or {
|
||||
mykeyboardlayout = mykeyboardlayout,
|
||||
mytextclock = mytextclock ,
|
||||
mylayoutbox = mylayoutbox ,
|
||||
|
@ -86,4 +92,9 @@ return {
|
|||
mytasklist = mytasklist ,
|
||||
mywibox = wb ,
|
||||
mypromptbox = mypromptbox ,
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
require("gears.timer").run_delayed_calls_now()
|
||||
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue