Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-02-23 19:24:54

joseba.villanueva
Member
Registered: 2016-04-14
Posts: 13

How can a script start when I am pressing Alt+Tab keys keeping “Window

I would like to know the way that when I press "Alt+Tab" keys in order to change the active window to other window, the system would recognize it and it would move the cursor to one specific place of the screen (with xdotool for example)

The mouse is sometimes inside the "Window Switcher Dialog" selecting one option of the "Window Switcher Dialog" app and at the same time this app is selecting another option. I find it confusing. When I press "Alt+Tab" keys", apart of selecting my desired application, I want to move the cursor to other part of the screen to see more clearly the Window Switcher Dialog selection. I do not know if I have explained clearly.

Thanks in advance.

Offline

#2 2017-02-23 21:37:09

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How can a script start when I am pressing Alt+Tab keys keeping “Window

You can try to do some alt-tab and mouse move simulations using xdotool, but it doesn't seem to work in a intuitive way. As an example, try this:

xdotool keydown alt && sleep .1 && xdotool key Tab && xdotool mousemove 0 0 && sleep 10 && xdotool keyup alt

...this gives you 10 seconds to make a choice. You can change the timeout value, but its not intuitive.

However, if the issue is that its confusing to see the normal selected window and the mouse selected window, you can theme the TabWin to hide certain elements (like the mouse highlight). See: https://forum.xfce.org/viewtopic.php?id=9585.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2017-02-24 09:34:47

joseba.villanueva
Member
Registered: 2016-04-14
Posts: 13

Re: How can a script start when I am pressing Alt+Tab keys keeping “Window

ToZ wrote:

You can try to do some alt-tab and mouse move simulations using xdotool, but it doesn't seem to work in a intuitive way. As an example, try this:

xdotool keydown alt && sleep .1 && xdotool key Tab && xdotool mousemove 0 0 && sleep 10 && xdotool keyup alt

...this gives you 10 seconds to make a choice. You can change the timeout value, but its not intuitive.

However, if the issue is that its confusing to see the normal selected window and the mouse selected window, you can theme the TabWin to hide certain elements (like the mouse highlight). See: https://forum.xfce.org/viewtopic.php?id=9585.

I tried the xdotool solution but the behavior does not work perfectly. Sometimes it stops running.

However, I tried what you proposed in the second solution and theming the TabWin is a good solution for me. I tried it and it works almost perfectly. The panel-button-hover.png image is not in the cloud.

Could you upload again?

Thank you for the information.

Offline

#4 2017-02-24 12:07:22

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How can a script start when I am pressing Alt+Tab keys keeping “Window

panel-button-hover.png

Or you can just create an image in gimp and make it all transparent.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2017-02-24 13:27:18

joseba.villanueva
Member
Registered: 2016-04-14
Posts: 13

Re: How can a script start when I am pressing Alt+Tab keys keeping “Window

It works!!!

Thank you.

Last edited by joseba.villanueva (2017-02-24 15:44:38)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 7 queries executed - Memory usage: 535.11 KiB (Peak: 535.95 KiB) ]