uzbl tab bar and minor fixes

This commit is contained in:
crater2150 2011-07-13 14:13:49 +02:00
parent 365590c3e9
commit cf9258bafc
4 changed files with 55 additions and 2 deletions

3
rc.lua
View file

@ -37,6 +37,7 @@ layouts =
dofile (MY_PATH .. "tags.lua") dofile (MY_PATH .. "tags.lua")
dofile (MY_PATH .. "wibox.lua") dofile (MY_PATH .. "wibox.lua")
dofile (MY_PATH .. "bindings.lua")
dofile (MY_PATH .. "rules.lua") dofile (MY_PATH .. "rules.lua")
dofile (MY_PATH .. "signals.lua") dofile (MY_PATH .. "signals.lua")
dofile (MY_PATH .. "uzbl.lua")
dofile (MY_PATH .. "bindings.lua")

View file

@ -17,11 +17,15 @@ awful.rules.rules = {
focus = true } }, focus = true } },
{ rule = { class = "pinentry" }, { rule = { class = "pinentry" },
properties = { floating = true } }, properties = { floating = true } },
{ rule = { class = "gimp" }, { rule = { class = "Gimp" },
properties = { floating = true } }, properties = { floating = true } },
-- Set Firefox to always map on tags number 2 of screen 1. -- Set Firefox to always map on tags number 2 of screen 1.
{ rule = { class = "Uzbl-core" },
properties = { tag = tags[rule_screen][2],
skip_taskbar = false } },
{ rule = { class = "Firefox", instance = "Navigator" }, { rule = { class = "Firefox", instance = "Navigator" },
properties = { tag = tags[rule_screen][2], properties = { tag = tags[rule_screen][2],
skip_taskbar = true,
floating = false } }, floating = false } },
{ rule = { class = "Pidgin" }, { rule = { class = "Pidgin" },
properties = { tag = tags[rule_screen][3]} }, properties = { tag = tags[rule_screen][3]} },

47
uzbl.lua Normal file
View file

@ -0,0 +1,47 @@
uzbltag = tags[rule_screen][2]
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
if not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
-- This will also un-minimize
-- the client, if needed
client.focus = c
c:raise()
end
end),
awful.button({ }, 3, function ()
if instance then
instance:hide()
instance = nil
else
instance = awful.menu.clients({ width=250 })
end
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))
mytasklist[rule_screen] = awful.widget.tasklist(function(c)
return awful.widget.tasklist.label.currenttags(c, rule_screen)
end, mytasklist.buttons)
uzblbox = {}
uzblbox = awful.wibox({ position = "top", screen = rule_screen })
uzblbox.visible = false
uzblbox.widgets = { mytasklist[rule_screen],
layout = awful.widget.layout.horizontal.rightleft }
uzbltag:add_signal("property::selected", function (tag)
uzblbox.visible = tag.selected
end)

View file

@ -146,6 +146,7 @@ else wlanwidget = nullwidget end
-- Create a wibox for each screen and add it -- Create a wibox for each screen and add it
leftwibox = {} leftwibox = {}
rightwibox = {} rightwibox = {}
mylayoutbox = {} mylayoutbox = {}
mytaglist = {} mytaglist = {}
mytaglist.buttons = awful.util.table.join( mytaglist.buttons = awful.util.table.join(