title: Python - How do I get the process name of the focused window on Ubuntu?(not the window title)
body: <p>I am writing a script recording how many time I spend on each applications every day.
  But I don't know how to get the process I am focusing on and its name.
  How can I achieve that?
  By the way, I see a lot of ways to get the focused window ID.
  Can I use it to get the process name?</p>