You are not logged in.
Hello all,
I've been using awesome wm for about four months now, but I still haven't yet really figured out how to prevent other applications from stealing focus. This is an important topic to me, because I'm into live coding for music, and when I spawn a visualization, it steals the focus from vim, preventing the live coding until I can navigate back over. Anyone know how to lock focus in awesome wm?
tacitdynamite
Offline
In the file rc.lua, there are one function "awful.hooks.manage.register". This function is called when a new client appears, and among other things, in the line "client.focus = c" it passes the focus to the new client.
You may make a condition to call or not this command, depending of who is the new client.
Last edited by renato_garcia (2009-10-09 03:15:33)
Offline
I know it's a very (4 years) old post but just now i was tired of keyboard focus stealing specially when i just boot up the system and need to run a few programs altogether while running some commands on terminal. it's really annoying to lose focus on terminal when a program lunches for any reason. my solution was to disable focusing the newly opened clients. so for future readers the solution for me:
apparently this is the job of "awful.rules" which governs the clients behaviors (i just read the rc.lua so correct me if i'm wrong). find the following code:
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },Here, the rule for all clients says to focus on every client which opens automatically. to disable that, just comment the line setting focus to true. the final code should looks like:
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
-- focus = true,
keys = clientkeys,
buttons = clientbuttons } },Finally you need to restart the window manager for changes to affects (probably using Super+Ctrl+R).
Offline
thanks
Offline
Thanks.
This fixed the problem for most programs. However I found it didn't work for Firefox (I like to yank URLs from mutt in rxvt-unicode). I had to set the following "about:config" entries to true:
browser.tabs.loadBookmarksInBackground
browser.tabs.loadDivertedInBackground
browser.tabs.loadInBackground (defaults to true)
Documentation is there : http://kb.mozillazine.org/Firefox_:_FAQ … s#Browser..
Last edited by a_neutrino (2013-12-10 02:24:04)
Offline
This seems to apply to windows that spawn a new window. What about existing windows that steal the focus, like Skype chats to? Skype is driving me crazy that way.
Offline