gunwald, Sunday 01 May 2011 à 23:53
|
|
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! |
Subscription date : 30 November 2007
Messages : 17118
|
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
|
|
|
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... |
Subscription date : 30 November 2007
Messages : 17118
|
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
|
|
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...
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;
xdotool key super+ctrl+F12
isrunning=`ps xufa | grep "$0" | grep -v grep`
wmctrl -a cairo-dock-dialog
sleep 1;
windowID=`xdotool getwindowfocus`
while [ "$windowID" = `xdotool getwindowfocus` ]; do
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
|
|
Subscription date : 30 November 2007
Messages : 17118
|
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
|
|
Subscription date : 24 January 2009
Messages : 12573
|
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
|
|
Subscription date : 30 November 2007
Messages : 17118
|
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
|
|
Subscription date : 24 January 2009
Messages : 12573
|
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
|
|
Subscription date : 30 November 2007
Messages : 17118
|
should maybe be reported, I confirm I have no problem by deactivating the prevention focus in ccsm with Compiz 0.8.6 |
|