ActivityWatch / aw-watcher-window-wayland

Window and AFK watcher for some Wayland compositors
Mozilla Public License 2.0
60 stars 14 forks source link

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

Closed zxcsvb closed 4 years ago

zxcsvb commented 4 years ago

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

johan-bjareholt commented 4 years ago

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

johan-bjareholt commented 4 years ago

Fixed in commit 87711f60b8d9a1b0d241f573b64881322d2616f4

Thanks for reporting! :slightly_smiling_face: