alt + tab后立即运行python文件

I wrote a python file ,which based on wmctrl output of the current window, changes the panel color . I want to bind this file to the alt+tab . I tried using system shortcuts but It disables the normal function of alt+tab . explaining this issue is kinda hard . consider sometimes you hold the Alt key , and press Tab key multiple times to switch to the desired window . I want right after releasing the Alt key , this python file to be run . I simply want to know , what is the complete command for Alt+Tab behavior (obviously I want a wmctrl syntax-based) , then do something like : sh -c "command 1; command 2" which command 1 : is the command for alt+tab and command 2 : is something like : python3 file.py

请帮我

评论