0

So I'm wondering if it's possible to take XMonad's ability to shift certain applications to specific workspaces a step further and apply it to specific modes/functions of Emacs?

For example I have mod+shift+u bound to spawn "emacs -f mu4e" which runs drops me into mu4e, the mail mode/function that i'm using to read mail. I'd like to bind that to a specific workspace instead of just opening in whatever workspace i'm in at present.

The problem (or not really a problem) is that I use Emacs extensively (mail, irc, etc.) and i'd like to have the specific modes/functions associated with workspaces and not have to move them there manually. I've looked at many XMonad.hs configurations and it seems that a huge majority use apps like pidgin, xchat, etc. and so it's trivial to setup the workspace association.

momo
  • 1,045
  • 3
  • 9
  • 18

1 Answers1

1

Maybe you could specify a specific window title for your Emacs frame and use it to setup the workspace association (instead of the window class, which I assume you'd use for pidgin or xchat)

emacs --title "mu4e" -f mu4e

I don't know xmonad, but if it is not able to provide workspace associations based on windows titles, you could use a tool like wmctrl instead. For example (assuming you want to move to the desktop number 4):

wmctrl -r mu4e -t 4

François Févotte
  • 19,520
  • 4
  • 51
  • 74
  • That did it, I set a title and added the following to my manageHook "title =? mu4e" --> viewShift ". – momo Mar 03 '13 at 06:20