97

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?

0

14 Answers 14

90

For 14.04 & 14.10:

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

5
  • 4
    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, 2014 at 21:44
  • 3
    +1 for that gsettings command. That saves me from installing ccsm
    – Flint
    Apr 21, 2014 at 8:09
  • 1
    Safe way rocks +1
    – scaamanho
    Sep 16, 2015 at 13:19
  • I went from hating Unity to loving it with this one-liner. May 16, 2016 at 20:57
  • 1
    Safe method also works on Ubunutu 16.04.
    – RaneWrites
    Apr 17, 2017 at 21:56
44

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.

At least, that bug now has the status opinion which means the developers 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.

4
  • 9
    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. Oct 28, 2011 at 2:58
  • 1
    The bug has been officially rejected by the Ubuntu overlords. See here: bugs.launchpad.net/ayatana-design/+bug/733349
    – Dave
    Feb 25, 2012 at 20:42
  • 1
    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). Apr 18, 2013 at 19:11
  • I tried the 14.10 solution and it worked! very happy.
    – Chris
    Mar 23, 2014 at 21:45
18

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.

2
  • 1
    The keyboard shortcut Super+D is a quick way to show the Desktop (minimize all windows)
    – 8128
    Apr 24, 2011 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, 2011 at 12:58
11

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).

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

For Ubuntu 14.04 to 17.04

Command line method :

Activate one click minimize :

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

Disable one click minimize :

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

GUI method :

Open a terminal and execute :

sudo apt-get install unity-tweak-tool

Open Unity Tweak Tool

Go to Unity > Launcher > Behavior and check : Minimize single window applications on click.

unity-tweak-tool screenshot

5

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.

1
  • 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. Oct 18, 2011 at 11:51
4

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.

6
  • I like the expose mode, but minimize for single instance windows doesn't seem to work. I hope they fix that asap Apr 22, 2011 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, 2011 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, 2011 at 1:01
  • 4
    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, 2011 at 6:40
  • 1
    Yes, minimizing is perfectly working in Win7 :)
    – Extender
    May 4, 2011 at 5:37
3

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)

2
  • 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, 2012 at 22:21
  • @NaomiJO: I edited my answer to address your questions.
    – Ian B.
    Sep 13, 2012 at 14:28
2
  • 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.

2
  • 4
    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!
    – Dave
    Feb 25, 2012 at 20:46
  • These options seems to change frequently. The minimize all listed here does not work on 13.10 unity. Jan 21, 2014 at 16:27
2

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

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

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.

1

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").

0

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.

-1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .