ActivityWatch / activitywatch

The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.
https://activitywatch.net/
Mozilla Public License 2.0
12.64k stars 564 forks source link

Process names (e.g. explorer.exe) instead of window titles by aw-watcher-window #674

Open Fivefold opened 3 years ago

Fivefold commented 3 years ago

Describe the bug

Not sure if this is actually a bug or intended behaviour, but the official screenshots imply otherwise. For window titles aw-watcher-window seems to log the process names (e.g. firefox.exe instead of Firefox). This also affects category matching, e.g. (case-sensitive) Firefox won't match the firefox application, but firefox.exe or (case-sensitive) firefox will.

This is on a fresh install.

Maybe it's relevant, I installed ActivityWatch using chocolatey https://community.chocolatey.org/packages/activitywatch

Expected behavior

Show the window titles as shown in the official screenshots.

activitywatch3

Documentation

activitywatch1 activitywatch2

Additional context

I found errors in the aw-watcher-window logs but don't think they are related:

2021-10-07 20:18:55 [INFO ]: aw-watcher-window started  (aw_watcher_window.main:51)
2021-10-07 20:18:56 [INFO ]: Connection to aw-server established by aw-watcher-window  (aw_client.client:419)
2021-10-07 20:53:53 [ERROR]: Exception thrown while trying to get active window: (-2147217385, 'OLE error 0x80041017', None, None)  (aw_watcher_window.main:75)
2021-10-07 20:55:52 [ERROR]: Exception thrown while trying to get active window: (-2147217385, 'OLE error 0x80041017', None, None)  (aw_watcher_window.main:75)
2021-10-07 22:30:43 [ERROR]: Exception thrown while trying to get active window: (-2147217385, 'OLE error 0x80041017', None, None)  (aw_watcher_window.main:75)
2021-10-07 23:33:29 [ERROR]: Exception thrown while trying to get active window: (-2147217385, 'OLE error 0x80041017', None, None)  (aw_watcher_window.main:75)

There's more identical OLE errors

Maybe those relate to the "unknown" application.

github-actions[bot] commented 3 years ago

Hi there! As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct. Thanks a bunch for opening your first issue! 🙏

johan-bjareholt commented 3 years ago

I think the screenshot is of the Linux build which does not have the same method of fetching the application name. The behavior you have is expected on windows I believe.

adil1214 commented 2 years ago

hi, im having this issue too on windows 11 please lmk if you want me to provide you with logs

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

dassels commented 2 months ago

Yes, it would be good to have the name/title show on Windows. I have the same issue with firefox.exe. When using different builds (like standard and developer edition), they all get reported as 'firefox.exe' so can't categorize them separately. Only work around so far was to rename the executable file so it the regex filters would be able to catch it. Not ideal as each time it gets updated I need to rename the file. If the window names were reported then one could categorize the different windows even though they are running under the same process name.