-
I want to change active pulseaudio sink for an application depending on whether it's process is responsible for currently focused window or not. The most reliable way to determine which sink input is created by application is PID. Therefore, I need PID of the process executing in current window. Is it possible to get it via IPC or some other way? |
Beta Was this translation helpful? Give feedback.
Answered by
KebabLord
Mar 30, 2024
Replies: 1 comment
-
you can use xprop + xdotools to get the pid of focused window xprop -id `xdotool getwindowfocus` | grep '_NET_WM_PID' | grep -oE '[[:digit:]]*$' |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kimifish
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can use xprop + xdotools to get the pid of focused window