I would like XMonad to switch workspaces in response to a network event (or, alternatively, a command line event since I can write another program to handle the network) rather than a keyboard event.
Is this possible?
https://hackage.haskell.org/package/xmonad-contrib-0.13/docs/XMonad-Hooks-ServerMode.html
It seems you can send 'XServer' events to it. Alternatively maybe https://github.com/jordansissel/xdotool might be simpler and sufficient.