Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 52

Thread: HOWTO: Make a launcher restore an open window (dock-like)

  1. #31
    Join Date
    Feb 2007
    Beans
    191

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    This script came in real handy earlier when I was using GIMP. One button click brought up all of the program windows. I did have a problem though in that sometimes when GIMP would spawn a window (for instance for the Drop Shadow plugin) it was somewhere behind other windows. Clicking the launcher brought it up of course, although not to the front. I doubt it's your fault. Probably something with focus stealing prevention in Metacity (which is what causes anything opened in Thunar to appear in the background).

    The Expose feature in Compiz makes the integration work better. You never really REQUIRE a task list. By the same token it WOULD be nice to have another version of the window list applet that only showed program icons instead of the full program name (and could be grouped as well of course). That combined with this would basically give you the "full" doc experience without having to use any external things like kiba or cairo or avant, and would continue to work even if you switch off your composite manager .

    On another note I do wish there was a way to bring a specific window from an application to the front though easily. I doubt this is possible without some kind of Gnome/GTK integration.

  2. #32
    Join Date
    Dec 2006
    Beans
    678

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    Quote Originally Posted by Mblackwell View Post
    This script came in real handy earlier when I was using GIMP. One button click brought up all of the program windows. I did have a problem though in that sometimes when GIMP would spawn a window (for instance for the Drop Shadow plugin) it was somewhere behind other windows. Clicking the launcher brought it up of course, although not to the front. I doubt it's your fault. Probably something with focus stealing prevention in Metacity (which is what causes anything opened in Thunar to appear in the background).
    I'll think about this. I could easily implement a window sort based on age rather than the X stack order (which would bring new windows like that to the top), but the question is how to implement the choice usefully. I could build in another switch so that individual programs behaved one way or the other, but I'm not sure that's the best solution. This may have to await better integration (at which point I might be able to add a right-click menu or something to enable an immediate choice).

    Quote Originally Posted by Mblackwell View Post
    The Expose feature in Compiz makes the integration work better. You never really REQUIRE a task list. By the same token it WOULD be nice to have another version of the window list applet that only showed program icons instead of the full program name (and could be grouped as well of course). That combined with this would basically give you the "full" doc experience without having to use any external things like kiba or cairo or avant, and would continue to work even if you switch off your composite manager .
    That is precisely my long-term goal; basically something that used the launcher icon if there was one, but added a "task list" icon as necessary as well. Something somewhat similar to the icon box in XFCE (but that lacks some flexibile I need). I suspect it can be done using standard python libraries and a new panel tool, so no need to install other programs - even to the point of not needing wmctrl or xautomation any more.

    Quote Originally Posted by Mblackwell View Post
    On another note I do wish there was a way to bring a specific window from an application to the front though easily. I doubt this is possible without some kind of Gnome/GTK integration.
    This would come naturally from the above mentioned changes, but I can't think of a way to implement it short of that.

  3. #33
    Join Date
    Feb 2007
    Beans
    191

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    I've noticed when using Gaim that it doesn't always minimize/restore all windows (yeah I'm using the -a switch).

    My exact launcher is:
    Code:
    launch-restore -a Gaim gaim
    Last edited by Mblackwell; May 8th, 2007 at 02:28 PM.

  4. #34
    Join Date
    Dec 2006
    Beans
    678

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    Quote Originally Posted by Mblackwell View Post
    I've noticed when using Gaim that it doesn't always minimize/restore all windows (yeah I'm using the -a switch).
    I don't use Gaim, but it seems to work okay in my test runs. Can you give me any more information about when it doesn't work (e.g., is it only when a specific window is open, whenever you have more than 3 windows open, etc.)? Do most of the windows do it, leaving one, or does it simply fail altogether? Also, is it only when (un)minimizing, or also when switching to it when another app has focus but minimization isn't an issue?

  5. #35
    Join Date
    Feb 2007
    Beans
    191

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    Only with the Buddy List and tabbed chat window open. What it does is just minimize one or the other (with no certainty as to which). Occasionally it will function correctly. It seems to do the other thing randomly. In fact right before posting this it was doing it but as I'm posting I can't make it perform incorrectly.

  6. #36
    Join Date
    Dec 2006
    Beans
    678

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    Quote Originally Posted by Mblackwell View Post
    Only with the Buddy List and tabbed chat window open. What it does is just minimize one or the other (with no certainty as to which). Occasionally it will function correctly. It seems to do the other thing randomly. In fact right before posting this it was doing it but as I'm posting I can't make it perform incorrectly.
    Since I've still not been able to reproduce it, and have been staring at code for > 60 hours already this week so am not likely to have the problem jump out at me, a couple of more questions/requests:
    1. If possible, the next time it starts to show this behavior, do a "wmctrl -lx" and compare the Gaim lines to when launch-restore is working properly (just in case it's wmctrl that is the problem).
    2. When it is only minimizing one window, what happens the next time you hit the launcher (i.e., does it restore the minimized window, or minimize the other)? If it is misbehaving, if you manually minimize both windows, does launch-restore bring them both back up?
    3. When you say it is "random," does that mean it doesn't correspond to which one has focus at the time?
    4. Very long shot - do you have anything set in Gaim that causes it to call attention to itself (e.g., when you receive an IM), and if so does the minimize problem occur during times when Gaim is doing so?

  7. #37
    Join Date
    Feb 2007
    Beans
    191

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    To answer the last two right away:

    3. Yes
    4. No, not anything beyond the normal window flash/systray icon chainge. Don't think there's any correspondence but I'd have to test it of course.

  8. #38
    Join Date
    Apr 2006
    Location
    England
    Beans
    37
    Distro
    Edgy Eft Testing

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    I have been trawling the net trying to find a way to do this (in particular with firefox cos it always launches a new instance/window).

    I haven't read through the whole thread yet but I have tried the script.
    I'm using it on sidux with kde (I'll be trying it on ubuntu next) and it works exactly as advertised.

    Fantastic stuff, thanks. I'll now get on with reading through the whole thread to see all the features.

  9. #39
    Join Date
    Dec 2006
    Beans
    678

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    Quote Originally Posted by shame View Post
    I have been trawling the net trying to find a way to do this (in particular with firefox cos it always launches a new instance/window).
    While I'm glad this worked for you, if all you are trying to do is prevent Firefox from spawning endless windows, you can do this instead (or in addition):
    1) Set Prferences -> Tabs -> open new windows in tabs
    2) point your browser to about:config
    3) set "browser.link.open_newwindow" to 3
    4) set "browser.link.open_newwindow.restriction" to 0

    That combination should eliminate the new window problem, only opening one if you specifically request it. However, none of the above restores focus to Firefox as launch-restore does.

  10. #40
    Join Date
    May 2007
    Location
    Washington
    Beans
    909

    Re: HOWTO: Make a launcher restore an open window (dock-like)

    I'm having a bit of trouble with this, I've had it working on my laptop before but I can't get it now. The only difference is this computer is 64bit, but it wasn't an architecture dependent package so that shouldn't matter. I'm trying to get it so when I click a launcher, if it's open, in minimizes. I've done it before but now when I do, for example
    Code:
    launch-restore -a amarokapp.Amarokapp amarok %U
    it brings Amarok to the front, but if I click it again, nothing.

Page 4 of 6 FirstFirst ... 23456 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •