diff --git a/rc.lua b/rc.lua index b23c560..45f7a3b 100644 --- a/rc.lua +++ b/rc.lua @@ -37,6 +37,7 @@ layouts = dofile (MY_PATH .. "tags.lua") dofile (MY_PATH .. "wibox.lua") -dofile (MY_PATH .. "bindings.lua") dofile (MY_PATH .. "rules.lua") dofile (MY_PATH .. "signals.lua") +dofile (MY_PATH .. "uzbl.lua") +dofile (MY_PATH .. "bindings.lua") diff --git a/rules.lua b/rules.lua index d9d37bc..5b5f255 100644 --- a/rules.lua +++ b/rules.lua @@ -17,11 +17,15 @@ awful.rules.rules = { focus = true } }, { rule = { class = "pinentry" }, properties = { floating = true } }, - { rule = { class = "gimp" }, + { rule = { class = "Gimp" }, properties = { floating = true } }, -- 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" }, properties = { tag = tags[rule_screen][2], + skip_taskbar = true, floating = false } }, { rule = { class = "Pidgin" }, properties = { tag = tags[rule_screen][3]} }, diff --git a/uzbl.lua b/uzbl.lua new file mode 100644 index 0000000..bbd6b22 --- /dev/null +++ b/uzbl.lua @@ -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) diff --git a/wibox.lua b/wibox.lua index 90a6ebd..1fe91dc 100644 --- a/wibox.lua +++ b/wibox.lua @@ -146,6 +146,7 @@ else wlanwidget = nullwidget end -- Create a wibox for each screen and add it leftwibox = {} rightwibox = {} + mylayoutbox = {} mytaglist = {} mytaglist.buttons = awful.util.table.join(