I've got my Emacs running on a tag worker
with server-start
launched. I have a file manager opened somewhere else (another monitor for example) and when I open a text file with emacsclient
it successfully opens in emacs but doesn't switch to it and doesn't rise it up.
What I'm looking for is a client specific signal in the rc.lua
. Something like:
client.add_signal("focus", function(c) c:raise() end)
I want it to be only Emacs specific. And switch to the worker
tag at the same time. Alternatively can I do it from Emacs rule callback?
Any ideas? 🙂
Best Answer
I wanted the same thing, and your idea of an emacs callback is what finally worked. I have not tested it on awesome, but I am using dwm, and I suppose they are similar enough for this to work.
This is the callback function in emacs:
There are several ways to invoke the callback. For simplicity and flexibility, I have opted for a shell alias which invokes the callback and then the regular emacsclient:
Hope it will still be useful ;)
For further reference on the message-type and values, see Window Manager Hints.
As for awesome's handling of this message, it seems that this event is handled. Source code is here.