Page 1 of 6 123 ... LastLast
Results 1 to 10 of 59

Thread: A hack to show minimized windows in Compiz's Scale plugin

  1. #1
    Join Date
    Jan 2005
    Beans
    77

    A hack to show minimized windows in Compiz's Scale plugin

    Attached is a Python script to deal with the fact that minimized windows aren't shown in Compiz's Scale plugin. The script unminimizes these windows, launches Scale, and (when Scale is finished) returns the windows to their previously minimized state.

    It can be initiated via a hot corner using the CompizConfig Settings Manager or via a launcher. You're on your own to set up a hot corner or launcher; I won't explain these options here. (But see post #9 below from hamidoo for some help on hot corners.) These options are relatively simple, but I don't use hot corners and the process of setting up a launcher is a little different in each of Gnome, KDE, and XFCE.

    This script is an imperfect hack, largely due to the processor-intensive task of unminimizing multiple windows at once. Window contents are discarded when windows are minimized and it takes time to recreate the contents when windows are unminimized, so the script can be a bit slow. On the other hand, on my middle-of-the-road desktop I was able to listen to Pandora skip-free even when unminimizing a couple dozen windows at once, though it took a while.

    Prerequisites

    Make sure you have Scale and Dbus as enabled Compiz plugins (and optionally Scale Addons as well). One way to do so is through ccsm, the CompizConfig Settings Manager. Fire up a terminal window and type the following:

    Code:
    sudo apt-get install compizconfig-settings-manager
    Then start ccsm to see what's enabled (you can use the "Filter" search box to help locate plugins):

    Code:
    ccsm
    Oh, and make sure Compiz is actually running, not some other window manager. (This has happened to me more than once.)

    That out of the way, there are some dependencies that need to be met. To install them, type the following in a terminal:

    Code:
    sudo apt-get install wmctrl xwit python-wnck
    Setup

    Download the "scale.py" file attached below.

    Make it executable. Make sure to do this! If the script doesn't work, the most likely cause is that permissions were not set properly. If you have saved it to your home directory as scale.py, type in a terminal:

    Code:
    chmod 755 scale.py
    Try it out:

    Code:

    Code:
    ./scale.py
    If it works, consider hooking it up using a hot corner or a launcher, as mentioned above.

    Configuration

    Hot Corner Options--If you set this script up with a hot corner and attempt to activate the script using the hot corner while a previously activated instance of the script is already running, you have several possible behaviors to choose from. Look for the first use of the "hotCornerOption" variable in the script to configure your preference.

    [0] (Default) First instance runs Scale with unminimizing windows. Second instance does nothing. (In other words, it continues to wait for user action to exit the first instance of Scale w/unminimized windows.)

    [1] The instances alternate between Scale both with and without unminimizing windows, the first instance being Scale without unminimizing windows. (However, if there are no previously unminimized windows to choose from, the script unminimizes all windows.)

    [2] The instances alternate between Scale both with and without unminimizing windows, the first instance being Scale with unminimizing windows.

    Viewport Options--Scale can show the windows in the current viewport (the default) or all viewports; this script can be adjusted for either option. To change this, look for the command near the end of this script that begins 'org/freedesktop/compiz...', as follows:

    Code:
    '/org/freedesktop/compiz/scale/allscreens/initiate_key'
    To have Scale show windows from all viewports, change the command as follows:

    Code:
    '/org/freedesktop/compiz/scale/allscreens/initiate_all_key'
    Regardless of which approach you use, only the windows in the current viewport are (un)minimized. To (un)minimize windows from all viewports would be a dizzying experience due to the rapid viewport changing it would require.

    Bugs

    In addition to being a bit slow in general, on occasion if a window unminimizes well before its screen contents are drawn (i.e., it's initially a gray box and later gets filled in), the script may begin re-minimizing windows prematurely. The script's re-minimization functionality is triggered when it detects a window activation event that occurs after Scale has started; in some rare cases, the late-breaking screen-drawing is interpreted as this event, rather than a user selection of a window. The behavior manifests itself shortly after Scale launches: windows will begin rearranging and disappearing spontaneously. The script includes a short timer to help catch and stop this problem, but it's not foolproof. If you have problems, you can adjust the timer. Look for the first instance of "pluginDelay" variable in the script to address this if it's an issue for you.

    This bug is most likely to occur when there are a large number of minimized windows running on a slow system. For instance, I encountered considerable problems on a fresh install of Kubuntu 8.10 beta, which suffered from some particularly bad nvidia performance issues. On a well-functioning install, I rarely if ever encounter this bug on a day-to-day basis, even on a low-powered eee 1000.

    One other bug: If you escape out of Scale without choosing or closing (using the Scale Addon plugin) any windows or selecting the desktop, window re-minimization still will be pending. Reminimization is dependent upon some window being selected or closed before you exit Scale, or the desktop being selected; if you do none of these, reminimization will occur after Scale exits, when you click on an inactive window.

    Finally, some Netbook Remix users may be unable to use this script out of the box. For these users, triggerring the script will often cause all windows to be immediately minimized. These users will need to uncomment the 'blackList' variable listed below. They may also need to 'sticky' a window (and preferrably make it reside under other windows) to achieve full functionality. Use of a screenlet such as ClockScreenlet can do the trick. See post #18 and subsequent posts for more.
    Attached Files Attached Files
    Last edited by Greg T.; June 26th, 2010 at 02:56 AM. Reason: Removed python-gnome2-extras as dependency

  2. #2
    Join Date
    Apr 2008
    Beans
    18

    Re: A hack to show minimized windows in Compiz's Scale plugin

    doest work for me...

  3. #3
    Join Date
    Nov 2008
    Beans
    1

    Re: A hack to show minimized windows in Compiz's Scale plugin

    I just wanted to say thanks for the wonderful workaround.

    It was a breeze to setup, and it is fairly quick.

  4. #4
    Join Date
    Apr 2006
    Beans
    39
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: A hack to show minimized windows in Compiz's Scale plugin

    Thanks for this. You can make things a bit faster for scale if you shorten the Minimize animation duration. Can't wait till this is fixed...

  5. #5
    Join Date
    Mar 2007
    Location
    Cape Town, SA
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: A hack to show minimized windows in Compiz's Scale plugin

    Styling!

    Looks good with a beam up animation


  6. #6
    Join Date
    Nov 2007
    Beans
    1

    Re: A hack to show minimized windows in Compiz's Scale plugin

    Thank you.

  7. #7
    Join Date
    Jan 2009
    Beans
    1

    Re: A hack to show minimized windows in Compiz's Scale plugin

    Any idea how to activate it via hot corner?

  8. #8
    Join Date
    Dec 2005
    Location
    New York
    Beans
    410
    Distro
    Ubuntu 19.10 Eoan Ermine

    Re: A hack to show minimized windows in Compiz's Scale plugin

    Well you can set it to hot corners using Brightside:

    Code:
    sudo apt-get install brightside
    Then configure it to one of the corners by running

    Code:
    brightside-properties
    This method however did not work very well for me. First of all I don't really like brightside very much. It takes a little long for it to actually activate the scale plugin and it seems a little buggy sometimes not even working.

    Also I really would like to be able to use this Scale Plugin hack by just brining the mouse to the bottom of the screen. Is there anyway or any application in Gnome that allows for this?

    As a side note I would really like to thank the OP for this excellent hack. It works really well and would be absolutely perfect if only I could be able to access it using the bottom of the screen.
    Last edited by dyous87; February 1st, 2009 at 11:40 PM.

  9. #9
    Join Date
    Apr 2009
    Beans
    21

    Re: A hack to show minimized windows in Compiz's Scale plugin

    [SOLVED]
    Thanks man for this awesome script!
    It works for me.
    I also found a very simple and fast way to activate the script on hot screen corners.
    Open CompizConfig Settings Manager and search for plugin name "commands"
    then add the command e.g ~/scale.py (~ is you home folder) ,then add Edge binding
    Last edited by hamidoo; April 24th, 2009 at 12:14 AM.

  10. #10
    Join Date
    Jul 2007
    Beans
    81

    Re: A hack to show minimized windows in Compiz's Scale plugin

    worked great thank you very much!

Page 1 of 6 123 ... 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
  •