Unobserved

This Week At Unobserved #2

2024-08-23

Inspector & Idle

This week I worked for twenty-eight hours on Furtherance and got a good bit done. Mostly, I worked on editing tasks, editing groups of tasks, adding a task to an existing group, manually adding a new task, and idle detection. Those first four items all go into the "inspector" (that's what Apple calls it at least--it's just a right-hand sidebar).

Furtherance Inspector

With those done, I decided to start more of the actual timer functionality, beginning with idle detection. This is where things got tricky. Using the user-idle crate, I was able to very easily implement the feature for macOS, Windows, and Linux x11. But, for some reason, Wayland makes it extremely difficult to just get idle time in seconds. I believe I found a work-around, which is creating a function that calls another function when a certain idle time is reached, but I'm still testing it and still am not certain it works properly.

I was able to get idle time in seconds for Gnome, whether or not the user is on Wayland, but I want this to be cross-platform, cross-desktop environment, so that's just not going to cut it. If only KDE and the rest of Wayland made it that easy. If anyone reading this is a contributor to those platforms (or to D-Bus itself) I would love to see this option.

Finally, while doing all of this testing, I've been getting even more into NixOS, and started using nix-shell for the first time, which I have to say is a pretty incredible concept once you get over the initial learning curve. Setting up a build environment once that you can then include in the git repository for anyone to use makes it way easier to provide build instructions that should work on anyone's system.

That's all I've got this week. Be sure to follow the development throughout the week on GitHub.