Home Forums Wiki Doc Install Extras Screenshots IRC Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Ideas | Propositions Auto minimize terminal on loosing focus
The latest stable release is the *3.2.1* : How to install it here.
Ideas | Propositions

Subjects Author Language Messages Last message
Auto minimize terminal on loosing focus
gunwald English 9 fabounet [Read]
22 September 2011 à 17:22

gunwald, Sunday 01 May 2011 à 23:53 | Quote


Subscription date : 02 August 2010
Messages : 22
I would like the terminal plugin having an option that makes it close (or minimize) loosing the focus or when the user clicks elsewhere, outside the terminal. That would be very practical!

fabounet, Monday 02 May 2011 à 15:07 | Quote


Subscription date : 30 November 2007
Messages : 16705
currenty it hides when you click on the dialog or on the dock. but I'll think of hiding it on loosing the focus

Guest, Monday 29 August 2011 à 07:25 | Quote

And how to make the terminal applet to take the focus when it opens? Now when I open it by shortcut (and the dock is hidden) it doesn't take the focus. So to write in it I should manually click on it and give it the focus. It's really annoying...

fabounet, Monday 29 August 2011 à 16:38 | Quote


Subscription date : 30 November 2007
Messages : 16705
indeed, I remember doing something to make it take the focus ... maybe in the 2.4
and what if you click on the icon instead of using the shortcut ?

gunwald, Wednesday 31 August 2011 à 12:36 | Quote


Subscription date : 02 August 2010
Messages : 22
If you have »xdotool« and »wmctrl« installed, you can use the following dirty little script to change the terminals behaviour as follows:

  • it gets the focus when it is started
  • it closes itself loosing the focus


To use the script you specify a short key for the applet and put it in line 27 of the script (standard is super+ctrl+F12)
Then you start the script with a short key, a compiz action or a customized launcher or what ever you want...

#!/bin/bash
LOCKFILE=/tmp/$(whoami)_$(basename $0).lock

[ -f $LOCKFILE ] && { 

   echo 
"$(basename $0) läuft schon"
   echo 
"Falls nicht, folgenden Befehl ausführen: rm -f $LOCKFILE"
   
"`wmctrl -l | grep cairo-dock-dialog`"  ] && { wmctrl -a panel; } 
   exit 
1
   
}

lock_file_loeschen() {
        
rm -f $LOCKFILE
        
echo lock-File $LOCKFILE gelöscht
}

trap "lock_file_loeschen ; exit 1" 2 9 15

echo "lege lock-File $LOCKFILE an"
echo $$ > $LOCKFILE


sleep 1
;

# Das Terminal starten oder schließen: Die Tastenkombination muß im Terminal-Applet festgelegt sein
xdotool key super+ctrl+F12

isrunning
=`ps xufa | grep "$0" | grep -v grep`


   
# Sicherstellen, daß das TerminalApplet den Focus hat, It's dirty, I know!
   
   
wmctrl -a cairo-dock-dialog
   sleep 1
;
   
   
# Die FensterId vom Terminal speichern
   
windowID=`xdotool getwindowfocus`

   while [ 
"$windowID= `xdotool getwindowfocus` ]; do

     
#sleep 1;
     
echo "Das Terminal läuft, FensterId ist:"
     
xdotool getwindowfocus
      
   done 
      
   
echo "Das Terminal hat den Focus verloren und wird daher jetzt geschlossen:"
   
xdotool key super+ctrl+F12


lock_file_loeschen
exit 0

fabounet, Sunday 04 September 2011 à 03:35 | Quote


Subscription date : 30 November 2007
Messages : 16705
I've tested with the shortcut and the click, the terminal has the focus initially.
so it has probably been fixed in the 2.4

matttbe, Sunday 04 September 2011 à 09:36 | Quote


Subscription date : 24 January 2009
Messages : 11234
Or it's maybe a problem with the WM: e.g. if I use GMenu to launch a custom command, I use this shortcut: Ctrl+F2. It seems that most of the time this new dialog doesn't have the focus.

And what about the idea? => Auto minimize terminal on loosing focus. This feature can also be used by other applet (e.g. the dialog of GMenu, Recent Events, etc.)

fabounet, Friday 09 September 2011 à 12:31 | Quote


Subscription date : 30 November 2007
Messages : 16705

And what about the idea? => Auto minimize terminal on loosing focus.

yep, why not.

about the focus, did you both try to deactive the focus steal prevention in Compiz ?

matttbe, Friday 09 September 2011 à 12:49 | Quote


Subscription date : 24 January 2009
Messages : 11234
I still have the problem with GMenu after having changed a lot of thing about the focus with the ccsm... strange

fabounet, Thursday 22 September 2011 à 17:22 | Quote


Subscription date : 30 November 2007
Messages : 16705
should maybe be reported, I confirm I have no problem by deactivating the prevention focus in ccsm with Compiz 0.8.6

Ideas | Propositions

Subjects Author Language Messages Last message
Auto minimize terminal on loosing focus
gunwald English 9 fabounet [Read]
22 September 2011 à 17:22

Post a message

Anti-spam filter 10 (+) plus (+) 7 =
            
Did you know ? You can easily create a google search by using the tag : [[google:SEARCH]]


Glx-Dock / Cairo-Dock List of forums Ideas | Propositions Auto minimize terminal on loosing focus Haut de page

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2012 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence.
Many thanks to TuxFamily for the web Hosting