ActivityWatch / aw-qt

Tray icon that manages ActivityWatch processes, built with Qt.
Mozilla Public License 2.0
27 stars 29 forks source link

Use monochrome-black trayicon on MacOS #52

Closed xylix closed 4 years ago

xylix commented 4 years ago

Fixes https://github.com/ActivityWatch/activitywatch/issues/295 Requires https://github.com/ActivityWatch/media/pull/1

johan-bjareholt commented 4 years ago

This library has no non-std dependencies and would solve the detection of a dark/light theme on macOS, could solve the issue nicely https://github.com/albertosottile/darkdetect

xylix commented 4 years ago

Trayicon.py does already import subprocess so a CLI command solution could be applied with no extra imports. But darkdetect leaves the codebase much cleaner and doesn't add unnecessary logic, so it's probably the nicer solution. I'll push a commit in a second.

xylix commented 4 years ago

Should the white-monochrome-logo be used on other platforms too or do you think the normal activitywatch logo looks better in Linux / Windows system tray?

johan-bjareholt commented 4 years ago

Should the white-monochrome-logo be used on other platforms too or do you think the normal activitywatch logo looks better in Linux / Windows system tray?

Since we have no idea what kind of theme the user has on the other platforms the safe option would be to use the non-monochrome icon as that doesn't have any transparency.

xylix commented 4 years ago

I had some problems getting pyinstaller to package darkdetect so I ended up using a Foundation snippet since trayicon.py already imports objc stuff on MacOS anyway. It's quite readable.

New icon on dark theme

Screenshot 2019-12-30 at 22 25 13

Old icon on dark theme

Screenshot 2019-12-30 at 22 27 07