Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I don't know if this is a feature or a bug, but clicking on an active application's launcher icon doesn't minimize it. It is terribly inconvenient for folks using a persistent Unity bar to click minimize button every time. Is there any way to add minimize functionality to the launchers?

share|improve this question

13 Answers 13

up vote 27 down vote accepted

For 14.04:

See this answer.

For 13.10 and below:

Because Mark Shuttlewoth decided it, at least for now?:

no, clicking on the icon will not minimise the app. We have a minimise button for that, it's prominent.

But at least, that bug has now the status opinion which means the develeopers won't fix it for now, but wait for community discussion.

So if you would like minimize on click, too, make a clear statement at launchpad.

share|improve this answer
6  
Same here, I agree with the fact that clicking on the icon should maximize/minimize it. THAT is intuitive since most people will feel comfortable doing it like that. Not only will it save problems like this for adjusting to something different but will make the minimize/maximize buttons in the windows mute. So they can remove them and substitute them for others buttons. –  Luis Alvarado Oct 28 '11 at 2:58
    
The bug has been officially rejected by the Ubuntu overlords. See here: bugs.launchpad.net/ayatana-design/+bug/733349 –  HDave Feb 25 '12 at 20:42
    
Not just the icons, but the corresponding Super+number shortcuts. In Windows 7 pressing Win+number will launch/focus/minimize. I find it very handy to keep no more than 2-3 windows at any one time to better focus on my work (with a clean desktop behind). –  faB Apr 18 '13 at 19:11
    
I tried the 14.10 solution and it worked! very happy. –  Chris Mar 23 at 21:45

For 14.04:

minimize-on-click in action

An unsupported capability was added to Unity for Trusty. Unsupported means that Canonical do not guarantee this capability moving forwards towards Unity 8.

However, from a LTS point-of-view this gives those users at least 5 years with just this capability. This is not directly available through the standard GUI.

For a safe way, reach for a terminal and copy & paste the following:

gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window true

To undo this change:

gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window false

For an unsafe method, you can use compizconfig-settings-manager Install compizconfig-settings-manager:

  1. Launch the application and click on Ubuntu Unity Plugin:

    CCSM Main Window

  2. Switch to the Launcher tab and put the checkmark beside Minimize Single Window Applications (Unsupported) to enable this feature.

    Launcher tab for Ubuntu Unity Plugin

share|improve this answer
    
I just upgraded to 14.10 (which took forever) and tried the "safe" solution. It worked instantly to my great satisfaction. thanks! –  Chris Mar 23 at 21:44
    
+1 for that gsettings command. That saves me from installing ccsm –  Flint Apr 21 at 8:09

For 13.10 and below

There is quite a heated debate about this missing feature on launchpad:

https://bugs.launchpad.net/ayatana-design/+bug/733349

In response to the expose mode for multiple windows, this can be easily adapted for with a second click to minimize all windows as there is currently no further function for that extra click in launcher.

If you want to minimize all the application's windows, I do not think there is an easy way currently so this functionality would help in that instance too.

share|improve this answer
1  
The keyboard shortcut Super+D is a quick way to show the Desktop (minimize all windows) –  8128 Apr 24 '11 at 8:15
    
Thanks, I was aware of that shortcut but I was talking about the multiple windows for a single application. –  Cas Apr 24 '11 at 12:58

I've made a script to workaround this issue.
See this working here.

Instructions

  1. You will need Xdotool Install xdotool and Compiz Config Settings Manager Install compizconfig-settings-manager from the Ubuntu Software Center

  2. Create a new file named '.minimize' in your home folder (gedit ~/.minimize). Copy & Paste the following text into it and save:

    #!/usr/bin/env python
    # by desgua
    # version 0.1.3 - May 06 2011
    # To minimize with unity Launcher
    ##################################
    import os
    import wnck
    import gtk
    
    stream = os.popen("xdotool click --clearmodifiers 1")
    screen = wnck.screen_get_default()
    
    while gtk.events_pending():
        gtk.main_iteration()
    
    windows = screen.get_windows()
    active_app = screen.get_active_window().get_application()
    
    for w in windows:
        if w.get_application() == active_app:
            w.minimize()
    
  3. Make the script executable: (More Info)

    chmod +x ~/.minimize
    
  4. Open Compiz Config

    Use Run Command, Alt + F2, and type ccsm

  5. Enable 'Commands' plugin then add the above script ~/.minimize to one of the empty command lines.

    compiz

  6. Change to Button Binding tab and make a button shortcut for the corresponding command line number above.

    The screenshot example is using Alt + Button1 which corresponds to Mouse left click with the Alt button held down.

    compiz2

  7. Enjoy! ;-)

UPDATE:

You can do this without a script, as Unity has a built-in keyboard shortcut to minimize the window. By default it's now Ctrl + Alt + 0 (Refer to SettingsKeyboard (NOT Keyboard Layout, that's different (and confusing)). Note that this means the NUMERIC KEYPAD zero key, and that the regular zero key will NOT work. Then with xdotool you just add a command xdotool key Ctrl+Alt+KP_Insert (Yes, it's the numeric keypad zero, which xdotool knows as KP_Insert) and assign it anywhere you like. You can even add it to an app's quick-list (Using MyUnity to define the quick list entry).

share|improve this answer
    
bash scripts should not have an extension if they are to be executed and certainly not 'sh'. see my other post –  Cas May 4 '11 at 0:10
1  
Improved again. Now it can minimize all windows from the same app ;-) –  desgua May 7 '11 at 0:46
    
@Cas thank you very much for the "instructions rework" ;-) –  desgua May 11 '11 at 11:21

This is just a workaround for the real problem, but there is a keyboard shortcut for minimizing windows, Alt + F9

It only closes the active window though and not all windows of an application.

This one and many other keyboard shortcuts are, however, configurable through the keyboard shortcuts application gnome-keybinding-properties. It is part of the system settings application that can be launched via the logout menu on the far right side of the panel.

I use this, for example, to be able to lock the screen via the pause button on my keyboard.

share|improve this answer
    
That's not really a workaround. What he wants to do, is to not click on the minimize button to minimize windows, but to click on the launch button to make the window disappear. He's wondering why that isn't possible. –  Jo-Erlend Schinstad Oct 18 '11 at 11:51

Clicking on a launcher icon of a running app displays the windows of that app in exposé mode, provided there's more than one window. So either that functionality would have to go in favor of the minimizing, or minimizing by clicking the launcher button would only work if the app does not have more than one window. The latter would be two functionalities for the same action, so I don't think that's gonna happen.

share|improve this answer
    
I like the expose mode, but minimize for single instance windows doesn't seem to work. I hope they fix that asap –  Eternal Owl Apr 22 '11 at 14:55
    
It does not "not work", it is not supposed to work. There is no such feature. At least AFAIK. That's what I said in my answer, and I gave some reasons as to why that might be. ;) –  nem75 Apr 22 '11 at 16:50
    
Not gonna happen? Why not? DockbarX allows you to do that same thing... Futhermore, compiz 0.9 is SUPPOSED to support showing minimized window thumbnails. Why would it be so hard? –  RolandiXor Apr 24 '11 at 1:01
3  
Exposé and minimize could exist together: Now, when in exposé mode, clicking on the launcher icon does nothing. Instead, that next click could minimize all windows from this application. And the next click could expose windows from this application on this workspace and so on, just cycle around. –  tobi Apr 24 '11 at 6:40
    
Yes, minimizing is perfectly working in Win7 :) –  Extender May 4 '11 at 5:37

For 12.04 - not 12.04.1 and later

You need a patched version of Unity to provide the functionality you are requesting. One is available called Unity-revamped.

sudo apt-add-repository ppa:ikarosdev/unity-revamped
sudo apt-get update && sudo apt-get upgrade

Note: You have to use compizconfiguration setting manager (ccsm) to activate the patched options.

sources: https://launchpad.net/~ikarosdev/+archive/unity-revamped/ , http://www.webupd8.org/2012/05/how-to-get-dodge-windows-and-minimize.html

Sometimes the ppa is a little behind updates to Unity, but I have experienced no stability problems and I love this package.

Features of Unity Revamped:

  • Dodge Windows behavior and options re-added. (This is the intelli-hide feature that only hides the launcher when a window would overlap it. That feature was removed in 12.04, auto-hide-where the launcher is by default hidden unless the mouse is over it- is still present)

  • Minimize on click behavior for Launcher items. (A second click activates the expose mode if there are multiple windows like the vanilla unity's default)

  • Option to allow menus to be permanently visible. When maximized, window controls will be alongside menu. (12.04 by default hides the window menus after a delay time and only shows the title in the top panel)

  • Option to enable/disable expo icon on launcher. Note: even if enabled, the expo icon will not show if multiple workspaces are not in use. (Note, you can use keyboard shortcut Cntl+Alt+Arrow to switch between workspaces if the expo icon isn't there)

I have had no issues using this patched version of Unity, but it is not always updated as fast as the vanilla flavor. For example, currently it provides unity-5.14.0-0ubuntu1, while in the official repository it's unity-5.16.0-0ubuntu1 (as of Sep 13,2012)

share|improve this answer
    
Thanks. Could you please edit and tell briefly: 1. Why the dodge window behaviour is said to be 're-added' in unity revamped, since as far as I know, it never left. 2. Without this unity revamped, what does it internally do when you left click on the icon of a window that is already on top. 3. Where is the title of the window then in unity revamped ? 4. What is the expo icon, and if it's the icon that allows to switch between workspaces, then how to get from one to two workspaces if the icon is not there? 5. How safe is this ppa ? –  NaomiJO Sep 12 '12 at 22:21
    
@NaomiJO: I edited my answer to address your questions. –  Ian B. Sep 13 '12 at 14:28
  • alt+f9 - minimize current
  • alt+ctrl+d- minimize all
  • alt+ctrl+d- reopen minimized

I think, this is default behaviour, so there is no need for another scripts or modifications.

share|improve this answer
3  
It's incredible to me that I have to memorize all these keyboard shortcuts to use Unity. In 18 years of working with desktop windowing environments, I've never seen something this hard to use. Welcome to the 1970s! –  HDave Feb 25 '12 at 20:46
    
These options seems to change frequently. The minimize all listed here does not work on 13.10 unity. –  Ben Lutgens Jan 21 at 16:27

For 12.04 - not 12.04.1 and later

There is an experimental patch for 12.04 that enables this behaviour. It is for testing purposes only.

Since it wasn't even considered adding minimize on click as an option, Jonathan French has created a PPA with the minimize on click patch.

https://launchpad.net/~ojno/+archive/unity-minimize-on-click

Installation:

sudo add-apt-repository ppa:ojno/unity-minimize-on-click
sudo apt-get update
sudo apt-get upgrade

Removal:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:ojno/unity-minimize-on-click

Please read the Web Upd8 article on the subject for more information.


Update:

There is now support available for 11.10 in the same PPA.

Excerpt from Package changes file:

Version: 4.28.0-0ubuntu2+ojno3
Distribution: oneiric

Changes: 
 unity (4.28.0-0ubuntu2+ojno3) oneiric; urgency=low
   * Apply minimize on click patch

Source: Web Upd8

share|improve this answer
    
I don't know how safe this is, because it replaces the original unity-package. But it works great! –  Jakob Mar 26 '12 at 11:39
    
I'd say it is experimental. For testing purposes only. –  lgarzo Mar 26 '12 at 11:40

I'm currently complementing my Unity launcher with a gnome-panel, this gives me the minimize behavior I want. It seems absurd, but the space in the top center of the screen is wasted otherwise anyway.

When you login to unity in 11.10, you can simply start gnome-panel (if you installed it via apt-get). I found it difficult to configure that panel initially so I logged out and then into the gnome classic session where I configured it to not expand and removed all the applets until I was left with just a panel with a window list. Then I used Ctrl + Alt + Delete to logout and log back into the Ubuntu/Unity session.

I found that adding the gnome-panel directly to the Startup Applications list caused it to land behind the Unity bar at the top so I added this instead: bash -c "/bin/sleep 2 && /usr/bin/gnome-panel&".

Edit: It looks like there are some bugs in the way gnome and unity interact. But making the panel auto-hide seems to work ok.

share|improve this answer

For 11.10

To change back (Oneiric 11.x): Shutdown button -> System Preferences -> Keyboard -> Shortcuts -> Navigation -> Hide Normal Windows (instructions for changing the shortcut are at the bottom of the settings window).

Hope this helps someone because it really annoyed me for a while (mainly due to name being changed to "Hide Normal Windows").

share|improve this answer

For 12.04

sudo add-apt-repository ppa:zxcq14/minimize-unity-7
sudo apt-get update
sudo apt-get upgrade

This ppa is available for 12.04 and 14.04. Minimize on click works again for most recent versions of unity.

share|improve this answer

See to minimize the the app you will see an option same like windows 7 but on the left hand side of the screen if your app is maximized the you have to scroll the cursor to the upper left hand corner of the screen and minimize it will minimize on the ubuntu unity launcher

share|improve this answer

protected by Community Jan 29 '12 at 19:44

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.