You are not logged in.
Pages: 1
hey guys.
i posted this in the awesome mailing list but thought id throw it up here incase anyone is not following it.
i have two wiboxs and id like to split my taglist in two. kinda like this:
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 |
this is what ive put together so far but it just doenst work.
-- {{{ Tags
tag_properties = { { name = "1"
, layout = layouts[1]
, mwfact = 0.618033988769
}
, { name = "2"
, layout = layouts[1]
, mwfact = 0.65
, nmaster = 1
}
, { name = "3"
, layout = layouts[1]
, ncols = 2
}
, { name = "4"
, layout = layouts[1]
}
}
tag_propertiestop = { { name = "5"
, layout = layouts[1]
, mwfact = 0.618033988769
}
, { name = "6"
, layout = layouts[1]
, mwfact = 0.65
, nmaster = 1
}
, { name = "7"
, layout = layouts[1]
, ncols = 2
}
, { name = "8"
, layout = layouts[4]
}
}
-- Define tags table.
tags = {}
for s = 1, screen.count() do
tags[s] = { }
for i, v in ipairs(tag_properties) do
tags[s][i] = tag(v.name)
tags[s][i].screen = s
awful.tag.setproperty(tags[s][i], "layout", v.layout)
awful.tag.setproperty(tags[s][i], "mwfact", v.mwfact)
awful.tag.setproperty(tags[s][i], "nmaster", v.nmaster)
awful.tag.setproperty(tags[s][i], "ncols", v.ncols)
end
tags[s][1].selected = true
end
tagstop = {}
for s = 1, screen.count() do
tagstop[s] = { }
for i, v in ipairs(tag_propertiestop) do
tagstop[s][i] = tag(v.name)
tagstop[s][i].screen = s
awful.tag.setproperty(tagstop[s][i], "layout", v.layout)
awful.tag.setproperty(tagstop[s][i], "mwfact", v.mwfact)
awful.tag.setproperty(tagstop[s][i], "nmaster", v.nmaster)
awful.tag.setproperty(tagstop[s][i], "ncols", v.ncols)
end
tagstop[s][1].selected = true
end
-- }}}
-- Create a wibox for each screen and add it
mywibox = {}
mywiboxtop = {}
mytaglist = {}
mytaglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, function (tag) tag.selected = not tag.selected end),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 5, awful.tag.viewnext),
awful.button({ }, 4, awful.tag.viewprev)
)
mytaglisttop = {}
mytaglisttop.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, function (tag) tag.selected = not tag.selected end),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 5, awful.tag.viewnext),
awful.button({ }, 4, awful.tag.viewprev)
)
-- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
mytaglisttop[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglisttop.buttons)
-- Create the wibox
mywibox[s] = wibox({ position = "bottom", fg = beautiful.fg_normal, bg = beautiful.bg_normal })
mywiboxtop[s] = wibox({ position = "bottom", fg = beautiful.fg_normal, bg = beautiful.bg_normal })
-- Add widgets to the wibox - order matters
mywibox[s].widgets = { mytaglist[s],
mytasklist[s],
mypromptbox[s],
mytextbox
}
mywibox[s].screen = s
mywiboxtop[s].widgets = { mytaglisttop[s],
mylayoutbox[s],
mpdbox,
wifiwidget,
s == 1 and mysystray or nil,
batterywidget,
}
mywiboxtop[s].screen = s
end
any ideas?
Offline
Pages: 1