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
928
Karma
7
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: afiestas, arojas, avishekk, Baidu [Spider], Bing [Bot], bjoernbalazs, Cris70, edmael, einar, epsi1on, Exabot [Bot], ggael, Google [Bot], google01103, Hans, ivan, jgrulich, joshaughnessy, jstaniek, koriun, La Ninje, Majestic-12 [Bot], MSNbot Media, ooker, progdan, scummos, sinclair, Sogou [Bot], TheraHedwig, Tioz, Yahoo [Bot]