I am trying to write a status bar module for dwm in python. I want the status bar to change to a specific string when pacman / apt or dnf is running. Is there a distribution independent way to check if some package manager is currently running and is it possible to extract information from it for example the download progress so it can be displayed in the status bar.