Reply to topic

[solved] set focus to previous window by script

novazur
Registered Member
Posts
23
Karma
0
OS
Hi,

First, sorry for my poor English...

In a shell script (bash), I need to set focus to the previous window.
I explain :
I want to launch an application (gkrellm) but give back the focus to the previous window.
Something like :
1. Get_Actual_Window
2. start gkrellm
3. Set_Focus_To_Previous_Window

Does someone know if it is possible and how to do that please ?

Thanks.

Last edited by novazur on Thu Dec 05, 2013 5:35 am, edited 1 time in total.
luebking
Registered Member
Posts
1671
Karma
11
xprop -root _NET_ACTIVE_WINDOW
but you probably can also just add a rule ("kcmshell4 kwinrules") for gkrellem, focus stealing prevention
novazur
Registered Member
Posts
23
Karma
0
OS
luebking wrote:but you probably can also just add a rule ("kcmshell4 kwinrules") for gkrellem, focus stealing prevention

I didn't know that at all. I had a look at it, and it seems to do the trick perfectly.
Thanks a lot.

 
Reply to topic

Bookmarks



Who is online

Registered users: andreas_k, Baidu [Spider], Bing [Bot], danikvsn, david_edmundson, davidemme, declanl, DeMus, Exabot [Bot], fieldmouse, garthecho, Google [Bot], google01103, hirnsushi, koriun, lomapur, Majestic-12 [Bot], MatusT, mgraesslin, rumangerst, Saabhero, tcotariu, torpak, Yahoo [Bot], Zegalur