On Fri, Dec 02, 2011 at 02:37:43PM +0100, Adam wrote:
> 成実Musee <[email protected]> writes:
> 
> > On Dec 2, 2011 6:43 AM, "Tomás Solar Castro" <[email protected]> wrote:
> >> did you try this?
> >>
> >> awful.rules.rules = {
> >>    -- All clients will match this rule.
> >>    { rule = { },
> >>      properties = { border_width = beautiful.border_width,
> >>                     border_color = beautiful.border_normal,
> >>                     focus = true,
> >>                     keys = clientkeys,
> >>                     buttons = clientbuttons,
> >>                     floating = true, -- here
> >>                   } },
> >>    { rule = { class = "MPlayer" },
> >>      properties = { tag = tags[1][1] } },
> >>        etc...
> >
> > I believe he wants it to actually be conditional - as in, not set all
> > clients to floating when created, but to make the client ontop IF it is
> > floating.
> a
> exactly!

You have to use a custom function. Try this instead of
awful.client.floating.toggle in your keybindings:

function (c)
  awful.client.floating.toggle(c)
  c.above = awful.client.floating.get(c)
end

> 
> > Possibly has to do with an application with dialog boxes that hide beneath
> > other windows. Pesky!
> 
> --
> To unsubscribe, send mail to [email protected].
diff --git a/rc.lua b/rc.lua
index b47cc7b..bb38cb5 100644
--- a/rc.lua
+++ b/rc.lua
@@ -223,7 +223,10 @@ clientkeys = awful.util.table.join(
                                                        c:kill()
                                                    end
                                                end),
-    awful.key({ modkey, "Control" }, "space",  awful.client.floating.toggle                     ),
+    awful.key({ modkey, "Control" }, "space",  function (c)
+                                                   awful.client.floating.toggle(c)
+                                                   c.above = awful.client.floating.get(c)
+                                               end                                              ),
     awful.key({ modkey, "Control" }, "/",      function (c) c:swap(awful.client.getmaster()) end),
     awful.key({ modkey, "Shift"   }, "/",      awful.client.movetoscreen                        ),
     awful.key({ modkey, "Shift"   }, "r",      function (c) c:redraw()                       end),

Reply via email to