ActivityWatch/docs

A Qt system tray app should not be the suggested install route

cunidev opened this issue · 7 comments

These are my main points:

  • at least 50% of Linux users, especially "vanilla" distro ones/newcomers, are using GNOME, which does not (sadly) support system trays anymore.
  • it forces users to have an extremely heavy dependency for little practical utility: as Linux is not Windows, it could well be running in background as a service/daemon the whole time for most users, who would still know how to properly start and stop it.
  • any UI toolkit should be fully detached from the back-end part by default, and suggesting a Qt "tray" UI as default for Linux users somewhat breaks this rule

Instead, providing instructions on creating a .desktop file (or including it) that simply starts the background daemon (like libinput-gestures does) would be a much cleaner approach.

It's not hard to get aw-server running as a systemd daemon (we even supply systemd service files for that, it's also what I personally use).

For the watchers however that's a bit trickier as they can only be run with an X session context, so they have to start when X has started. Something like this might work, but I haven't tested it
https://superuser.com/a/1128905

The simplest solution I found for Gnome and/or other desktops, with or without system trays, does not require Qt

I've simply created two files, start.sh and kill.sh, that couldn't be simpler:

start.sh:

#!/bin/bash

./activitywatch/aw-server &
./activitywatch/aw-watcher-afk & 
./activitywatch/aw-watcher-window [--exclude-title?] &

kill.sh:

#!/bin/bash

pkill aw-

Should something similar be the default solution for non-Qt users?

Those that don't want to use the tray icon could do something like that, yes.

But as I said before, it won't become the default since the UX of it is terrible.

Sure. My main question was: could something like this be added to the documentation as an install option for GNOME users?

Sure, the docs already mentions Gnome 3 so you could change that text with something pointing to a section of the docs on how to run it easily on Gnome 3.

https://activitywatch.readthedocs.io/en/latest/getting-started.html#usage

Your PR (#28) was merged. Closing.