ActivityWatch/aw-watcher-window-wayland

The client_locks directory isn't created if missing (e.g if running for the first time without having previously used aw-watcher-window)

zxcsvb opened this issue · 2 comments

Attempting to run for the first time on a new computer (with sway 1.5, and the latest aw-server-rust already running) after building results in a crash:

$ aw-watcher-window-wayland 
### Setting up display
### Fetching wayland globals
### Setting up toplevel manager
### Setting up idle timeout
### Syncing roundtrip
### Preparing poll fds
### Taking client locks
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Failed to get lock for client \'aw-watcher-window-at-localhost-on-5600\': No such file or directory (os error 2)"', src/main.rs:127:111

after running:
$ mkdir ~/.cache/activitywatch/client_locks/
This is fixed:

$ aw-watcher-window-wayland 
### Setting up display
### Fetching wayland globals
### Setting up toplevel manager
### Setting up idle timeout
### Syncing roundtrip
### Preparing poll fds
### Taking client locks
### Creating aw-client
### Watcher is now running

However, this isn't done automatically, which it seems like it should be given the absence of any instructions to do so in the readme, and the fact that aw-watcher-window already appears to automatically do so

Good point, definitely something that needs to be fixed.
Will hopefully have time to fix it tomorrow.

Fixed in commit 87711f6

Thanks for reporting! 🙂