2

I am on Linux and would like to get the name of the window which currently has the focus. For example supposing my Python script is running, it should somehow get the data "Stack Overflow Where Developers Learn, Share,& Build Careers - Mozilla Firefox" if that's the window which currently has the focus, when I change to another tab/window it should get "Google - Mozilla Firefox" because in that tab/window google is open.

I found some solutions online using Xlib. But I would like to find another way which doesn't require me to install any additional modules/packages.

Does anybody know an alternative solution?

Thanks

  • this one ? `https://stackoverflow.com/questions/10266281/obtain-active-window-using-python` but it also requires a package – mbieren Apr 06 '18 at 12:56

0 Answers0