I'm new to emacs and elisp, but I'd like to modify (for example) windmove-left so that if it's unable to move left due to being at the edge of the program it instead calls an outside function (in my case "bspc node -f west"). I think if I'm able to accomplish this I should be able to handle switching contexts from the wm back into emacs on the wm side, but I don't know much about elisp hooks and advices yet, could someone let me know at a high level what's the best way to implement this?