From: martin f. krafft Date: Sun, 13 Jul 2008 17:02:33 +0000 (+0200) Subject: follow config changes X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/ff3d38e32079347b4eed7e368a9f48bbea43e362?ds=inline follow config changes --- diff --git a/.awesomerc.lua b/.awesomerc.lua index f207526..d2c717e 100644 --- a/.awesomerc.lua +++ b/.awesomerc.lua @@ -92,14 +92,33 @@ mytaglist:mouse_add(mouse({}, 3, function (object, tag) tag.selected = not tag.s mytaglist:mouse_add(mouse({ modkey }, 3, function (object, tag) awful.client.toggletag(tag) end)) mytaglist:mouse_add(mouse({ }, 4, awful.tag.viewnext)) mytaglist:mouse_add(mouse({ }, 5, awful.tag.viewprev)) -mytaglist.text_focus = " </span> " +function mytaglist.label(t) + local text = "" + if t.selected then + text = "<bg color='"..bg_focus.."'/> <span color='"..fg_focus.."'>"..t.name.."</span> " + else + text = " "..t.name.." " + end + return text +end -- Create a tasklist widget mytasklist = widget({ type = "tasklist", name = "mytasklist" }) mytasklist:mouse_add(mouse({ }, 1, function (object, c) c:focus_set(); c:raise() end)) mytasklist:mouse_add(mouse({ }, 4, function () awful.client.focus(1) end)) mytasklist:mouse_add(mouse({ }, 5, function () awful.client.focus(-1) end)) -mytasklist.text_focus = "<bg color='"..bg_focus.."'/> <span color='"..fg_focus.."'><title/></span> " +function mytasklist.label(c) + local text = "" + if c.floating then + text = "<bg image=\"@AWESOME_ICON_PATH@/floatingw.png\" align=\"right\"/>" + end + if client.focus_get() == c then + text = text .. " <bg color='"..bg_focus.."'/><span color='"..awful.escape(fg_focus).."'>"..c.name.."</span> " + else + text = text .. " "..awful.escape(c.name).." " + end + return text +end -- Create a textbox widget mytextbox = widget({ type = "textbox", name = "mytextbox", align = "right" }) @@ -109,7 +128,7 @@ mypromptbox = widget({ type = "textbox", name = "mypromptbox", align = "left" }) -- Create an iconbox widget myiconbox = widget({ type = "textbox", name = "myiconbox", align = "left" }) -myiconbox.text = "<bg image=\"/usr/local/share/awesome/icons/awesome16.png\" resize=\"true\"/>" +myiconbox.text = "<bg image=\"" .. AWESOME_DATADIR .. "/icons/awesome16.png\" resize=\"true\"/>" -- Create a systray mysystray = widget({ type = "systray", name = "mysystray", align = "right" }) @@ -123,7 +142,7 @@ for s = 1, screen.count() do mylayoutbox[s]:mouse_add(mouse({ }, 3, function () awful.layout.inc(layouts, -1) end)) mylayoutbox[s]:mouse_add(mouse({ }, 4, function () awful.layout.inc(layouts, 1) end)) mylayoutbox[s]:mouse_add(mouse({ }, 5, function () awful.layout.inc(layouts, -1) end)) - mylayoutbox[s].text = "<bg image=\"/usr/local/share/awesome/icons/layouts/tilew.png\" resize=\"true\"/>" + mylayoutbox[s].text = "<bg image=\"" .. AWESOME_DATADIR .. "/layouts/tilew.png\" resize=\"true\"/>" end -- Create a statusbar for each screen and add it