I am very fond of xmonad, but one thing would be great:
If I open a file by gvim -p --remote-tab-silent my-file and it gets opened in vim which is always on workspace 1, I want to switch automatically to workspace 1.
I just discovered the viewShift-trick, but this only changes the workspace if a new gvim is spawned, and as such solves my problem just in part.
Edit:
Thanks to Daniel Wagner's comment I was able to do some research:
I found a little program to set and unset urgency hints: seturgency. And with xwininifo I can get gvim's window id. After some trial and error I xprop showed me that the hint flag was actually set.
GVIMWINID=`xwininfo -tree -root | grep GVIM | cut -d ' ' -f6`
seturgent $GVIMWINID 1
xprop -id $GVIMWINID | grep urgency
now i added
import XMonad.Hooks.UrgencyHook
..
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
[..
, ((mod4Mask , xK_x ), focusUrgent)
..]
..
main = do¬
xmproc <- spawnPipe "/usr/bin/xmobar"¬
xmonad $ withUrgencyHook NoUrgencyHook $ defaultConfig {..}
to my .xmonad.hs, and xmonad --recompile && xmonad --restart was without errors but no hitting mod4 + x did nothing, though xprop did report the urgency hint is set.