bug: randr plugin (and anyrun as a whole) panics on Hyprland 0.40.0
Steps to reproduce:
- install and run Hyprland >0.40.0
- open anyrun
Expected behavior:
- anyrun opens without issues
Actual behavior:
- anyrun panics:
thread '<unnamed>' panicked at 'A error occured while parsing the output from the hypr socket: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })', /home/peppidesu/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprland-0.3.9/src/data/regular.rs:31:19 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', plugins/randr/src/lib.rs:106:1 thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', plugins/randr/src/lib.rs:37:1 file:plugins/randr/src/lib.rs line:37 Attempted to panic across the ffi boundary. Aborting to handle the panic...
Reason:
Hyprland has moved the hyprland socket from /tmp/hypr to $XDG_RUNTIME_DIR in 0.40.0. This change has been merged into hyprland-rs:master and is included in version 0.4.0-alpha.1, but is not yet included in the latest stable release.
Solution: Either:
- wait for the next release of
hyprland-rs, and change the package version inplugins/randr/Cargo.toml. - temporarily use the alpha release of
hyprland-rshyprland = "0.4.0-alpha.1"
This didn't fix issues on current Arch, I wouldn't be too fast with this.
As a workaround you can symlink it to the expected location.
As a workaround you can symlink it to the expected location.
@Lord-Valen this would need to be done on every boot, though.
As a workaround you can symlink it to the expected location.
@Lord-Valen this would need to be done on every boot, though.
Yes. Better than not working at all!
hyprland-rs has not yet put out a stable release with the relevant changes. For people reading this right now, you can do one of the following:
- At startup, symlink
$XDG_RUNTIME_DIR/hyprto/tmp/hypr:ln -s $XDG_RUNTIME_DIR/hypr /tmp/hypr - (Arch): Modify the PKGBUILD
- remove the
--frozenflag fromcargo buildon line 31 - add the following at the end of
prepare():
then runsed -i 's/hyprland = "0.3"/hyprland = "0.4.0-alpha.2"/g' plugins/randr/Cargo.tomlmakepkg -sias per usual. - remove the