I know the title sounds a little strange but hear me out. The time tracking software I use for work doesn’t work on Wayland, unless I’m using Gnome as my DE. They have an extension that allows it to work in this case. Personally, I don’t enjoy Gnome on my desktop (I use it on my laptop). Is there a way for me to get the functionality that this extension provides on KDE so that I can use Wayland on my desktop as well?
Pretty much. My company has it set to track the following:
Periodic screenshots
Mouse and keyboard activity
Apps used
URLs visited
All of this is combined to determine how active you were (as a percentage), you can then try and determine how much time was spent on productive vs non-productive work. However, we use it as a glorified timesheet.
The GNOME extension appears to get the currently focused window information (ie name, title, PID and executable name) and make this information available over DBUS for the client binary.
The client binary calls gnome-screenshot -f and I assume gives a path that the client binary then sends to Hubstaff servers.
A janky suggestion would be to create a Kwin Script that pulls the active window information, sends it (somehow) to a DBUS service that can provide it to the client binary and create a wrapper script around spectacle to pretend to be gnome-screenshot (eg spectacle -b -f $@)
I don't know if this would work fully though as the client binary strings seem to hint it checks the running version of GNOME Shell, and without an account I can't see if this is a hard requirement or a "Hey, this is broken, we'll try our best!" type thing.
I tried contacting support to get it fixed from their side (haven't followed up recently). The issue they noted from my logs was the following:
2024-02-29 02:00:12.809995 [AUDIT] [main] ActivityTracker.cpp:923 (START_IGNORED) Unable to start tracking project(2730068) due to Screenshots data consent/permission.
In the app, you need to enable permission for tracking (see screenshot). For some reason, this permission isn't granted "correctly" on Wayland which means it won't let me track time. At least that's how I understand it.