Getting pid and details for topmost window

前端 未结 9 1073
醉酒成梦
醉酒成梦 2020-12-04 13:08

Does anyone know how to get the PID of the top active window and then how to get the properties of the window using the PID? I mean properties like process name, program nam

9条回答
  •  清歌不尽
    2020-12-04 13:26

    Install wmctrl (from the repositories). wmctrl -lp could be what you want. You can always take a look at the source if you need it from your program.

提交回复
热议问题