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 quite Unity but it seems like odd behaviour that clicking on the icon "focusses" the application instead of minimising it when it's already focussed.

share|improve this question
    
Note that it's possible this will change in 11.04 –  8128 Nov 10 '10 at 15:28

2 Answers 2

up vote 4 down vote accepted

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

Instructions

1) We will need XDoTool and Compiz.

You can install these from the Ubuntu Software Center or by clicking here (xdotool) and here (Compiz)

2) Open Compiz (Alt + F2 and type ccsm and hit Enter)

3) Go to Commands and add ~/.minimize to one command:

enter image description here

4) Then go to Button Binding and make a shortcut for it.

enter image description here

5) Make a file named .minimize at your home folder (gedit ~/.minimize). Paste this 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()

6) Make it executable (Here's how to do that).

7) Enjoy! ;-)

share|improve this answer

No, it is not possible to minimize a focused application by clicking on the launcher icon in the launcher bar (= panel on the left).

When you do this, you initiate the "app expose" function, which will give you an overview of all running instances of the focused application. Eg., when a terminal is focused and you have four terminals opened, then clicking on the launcher would give you this:

This also happens with only one instance open - seems odd, but changing the click behavior for one use case would introduce (unwanted) inconsistency. However, I do not know if it's planned to fundamentally change all of this for Ubuntu 11.04.

share|improve this answer
    
Wow, where did that themed Unity come from?! –  Bou Nov 12 '10 at 17:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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