Assume that I am running vlc on desktop 5. I want to pause it when I switch to some other desktop and resume when I switch back to desktop 5. How to achieve this effect in xmonad?
In vlc, go to the
It will automatically play/pause when you switch from/to the workspace. Better, if you have a dual screen, even if you work on the other screen it will continue to play the video until you switch the workspace where vlc is.
In other words, it will play the video only when vlc is visible, as soon as vlc is hidden the video is paused.