xlsclients

List all client applications currently running on an X display.

brewmacoslinux
Try with needOr install directly
Source

About

List client applications running on a display

Commands

xlsclients

Examples

see all open windows and applications on my screen$ xlsclients
check what apps are running with their process IDs$ xlsclients -l
list running applications on a specific X display$ xlsclients -display :0
show window IDs for all open client applications$ xlsclients -m
get detailed info about running X clients and their names$ xlsclients -l -m