Instead of going off the active app, doesn't it make more sense to categorize based on the open document, or the folder tree that the document is in?