]> 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>
Tue, 14 Oct 2008 10:55:34 +0000 (12:55 +0200)
committermartin f. krafft <madduck@madduck.net>
Tue, 14 Oct 2008 10:55:34 +0000 (12:55 +0200)
.config/awesome/rc.lua

index 3f218752b8f070778ee3522ce9f4cd853e1f0246..29b0d62105c585094332de15b5d7d3e8f4f9c50a 100644 (file)
@@ -130,8 +130,8 @@ mytaglist.label = awful.widget.taglist.label.all
 mytasklist = widget({ type = "tasklist", name = "mytasklist" })
 mytasklist:buttons({
     button({ }, 1, function (object, c) client.focus = c; c:raise() end),
-    button({ }, 4, function () awful.client.focusbyidx(1) end),
-    button({ }, 5, function () awful.client.focusbyidx(-1) end)
+    button({ }, 4, function () awful.client.focus.byidx(1) end),
+    button({ }, 5, function () awful.client.focus.byidx(-1) end)
 })
 mytasklist.label = awful.widget.tasklist.label.currenttags
 
@@ -260,7 +260,7 @@ keybinding({ modkey }, "Escape", awful.tag.history.restore):add()
 keybinding({ modkey }, "Return", function () awful.util.spawn(terminal) end):add()
 
 keybinding({ modkey, "Control" }, "r", function ()
-                                           mypromptbox.text =
+                                           mypromptbox[mouse.screen].text =
                                                awful.util.escape(awful.util.restart())
                                         end):add()
 keybinding({ modkey, "Shift" }, "q", awesome.quit):add()
@@ -294,24 +294,25 @@ keybinding({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -
 
 -- Prompt
 keybinding({ modkey }, "F1", function ()
-                                 awful.prompt.run({ prompt = "Run: " }, mypromptbox, awful.util.spawn, awful.completion.bash,
+                                 awful.prompt.run({ prompt = "Run: " }, mypromptbox[mouse.screen], awful.util.spawn, awful.completion.bash,
 os.getenv("HOME") .. "/.cache/awesome/history") end):add()
 keybinding({ modkey }, "F4", function ()
-                                 awful.prompt.run({ prompt = "Run Lua code: " }, mypromptbox, awful.eval, awful.prompt.bash,
+                                 awful.prompt.run({ prompt = "Run Lua code: " }, mypromptbox[mouse.screen], awful.util.eval, awful.prompt.bash,
 os.getenv("HOME") .. "/.cache/awesome/history_eval") end):add()
 keybinding({ modkey, "Ctrl" }, "i", function ()
-                                        if mypromptbox.text then
-                                            mypromptbox.text = nil
+                                        local s = mouse.screen
+                                        if mypromptbox[s].text then
+                                            mypromptbox[s].text = nil
                                         else
-                                            mypromptbox.text = nil
+                                            mypromptbox[s].text = nil
                                             if client.focus.class then
-                                                mypromptbox.text = "Class: " .. client.focus.class .. " "
+                                                mypromptbox[s].text = "Class: " .. client.focus.class .. " "
                                             end
                                             if client.focus.instance then
-                                                mypromptbox.text = mypromptbox.text .. "Instance: ".. client.focus.instance .. " "
+                                                mypromptbox[s].text = mypromptbox[s].text .. "Instance: ".. client.focus.instance .. " "
                                             end
                                             if client.focus.role then
-                                                mypromptbox.text = mypromptbox.text .. "Role: ".. client.focus.role
+                                                mypromptbox[s].text = mypromptbox[s].text .. "Role: ".. client.focus.role
                                             end
                                         end
                                     end):add()
@@ -457,7 +458,7 @@ awful.hooks.manage.register(function (c)
     -- i.e. put it at the end of others instead of setting it master.
     -- awful.client.setslave(c)
 
-    -- Honor size hints: if you want to drop the gaps between windows, set this to false.              |      if maxapps[inst] or maxapps[cls] then                                                              
+    -- Honor size hints: if you want to drop the gaps between windows, set this to false.
     c.honorsizehints = true
 
     -- Maximise some
@@ -524,7 +525,7 @@ function get_acpibatt()
     local s = f:read('*l')
     f:close()
     if not s then
-      return laststring;
+      return '-';
     end
 
     -- Battery 0: Discharging, 89%, 00:02:14 remaining
@@ -547,7 +548,7 @@ function get_acpibatt()
     elseif status == 'Discarching' then
       status = 'd';
     else
-      status = '';
+      status = '-';
     end
 
     return percent; -- .. ' (' .. status .. ')'; -- .. ' ' .. time .. ' left';