This has kind of annoyed me too, I guess your post motivated me to try to
figure out something. Here's what I did.

I added a global variable "last_tag" to store the tag where I ran my
command.

    awful.key({ modkey },            "r",
              function ()
                  last_tag = awful.tag.selected(1)
                  mypromptbox[mouse.screen]:run()
              end),

Then I added this else clause in the register hook.

    if target then
        c.screen = target.screen
        awful.client.movetotag(tags[target.screen][target.tag], c)
    else
        awful.client.movetotag(last_tag, c)
    end

Keep in mind I'm using awesome 3.3. Also this solution is rather kludgy,
i.e. if you are launching multiple apps then this won't work as expected. I
suppose you could use some data structure like a hash to take care of that,
but that's more work than I want to do at the moment.

On Sun, May 31, 2009 at 6:23 AM, Adrian von Stechow <[email protected]>wrote:

> Hi-
>
> I often find myself spawning a client with a long startup time while
> having tag A active, then switching to tag B while the application is
> still starting, only to have the application spawn in tag B. I then
> have to push the app back to the tag where I initially wanted it to
> be.
> Binding an app to a specific tag isn't really what I'm looking for,
> although it does alleviate the problem a bit.
> Does anyone have a solution for this?
>
> Adrian
>
> --
> To unsubscribe, send mail to [email protected].
>

Reply via email to