]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

follow config changes
authormartin f. krafft <madduck@madduck.net>
Sun, 13 Jul 2008 17:02:33 +0000 (19:02 +0200)
committermartin f. krafft <madduck@madduck.net>
Sun, 13 Jul 2008 17:02:33 +0000 (19:02 +0200)
.awesomerc.lua

index f207526edecb02296d5f0309c5361690b4444313..d2c717ea9648422fc797c87d0b26e0c8eac5d854 100644 (file)
@@ -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 = "<bg color='"..bg_focus.."'/> <span color='"..fg_focus.."'><title/></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