On Wed, Feb 24, 2010 at 1:18 PM, Sachiel <[email protected]> wrote:
> Hi all,
>
> I would like to launch an application (client) without giving it the focus.
> So, if I launch it from an focused application in full screen or maximized
> layout, it starts on the background. I've not found a direct way of doing
> it, so what I've tried is launching the application normally, and then use
> the awesome-client to modifify the focus. So, in sh, it would be:
>
> # new_app; sleep 0.25; echo "awful.client.focus.history.previous() if
> client.focus then client.focus:raise() end" | awesome-client
>
> This has been taken from Mod4+<Tab> keybind from the default config file.
> The sleep is an addon to give time to the new_app to start. Another
> possibility could be:
>
> # new_app; sleep 0.25; echo "awful.client.focus.byidx( 1) if client.focus
> then client.focus:raise() end" | awesome-client
>
> This is from the keybind Mod4+"j".
>
> I guess if there is a more elegant way to do this. Suggestions?
>

Yep, use awful.rules. :)
Take a look at line 285 of the default rc.lua file. All you need to do
is add a rule that will match your client and set focus to false.
Something like:
{rule = { name = "client name here" }, properties = { focus = false }}

For more info check out the documentation for awful.rules:
http://awesome.naquadah.org/doc/api/modules/awful.rules.html#rules

-- 
To unsubscribe, send mail to [email protected].

Reply via email to