Newly created window to front focus?
I'm new to using Subtle and I was just wondering: is there a way to make a newly created window (e.g. mplayer or feh) become automatically focused no matter where the mouse is? Or maybe to remove the window focusing based on the mouse pointer all together if that's not possible.
I have the issue where when I type "feh *" in a folder full of images and cycle through them I always have to move the mouse or move focus to feh. This might be because I have set feh to float so that I can see the images as they were meant to be seen, i.e. not stretched. I've also set mplayer to float and I have the issue that whenever I open a video that the mplayer window won't focus and I'll have to focus it to change the volume, etc.
Thanks for any help!
focus is bound to pointer position, because the specs say logical focus has to follow pointer.
There is more than one way to archive what you want.
- Set the window to urgent:
tag "urgent" do match "feh" float true stick true urgent true end
- Add a custom hook:
on :client_create do |c| c.focus if("feh" == c.name) end
If it doesn't work please let me know.
RE: Newly created window to front focus? - Added by Rob Jones almost 9 years ago
Argh, I knew there was something that I must have missed in the tag properties. Thank you very much for pointing me in the right direction. :)
Happy New Year!