hyprland-community / hyprland-rs

An unofficial rust wrapper for hyprland's IPC [maintainers=@yavko,@cyrinux]
Other
252 stars 56 forks source link

Support new hyprland socket location #218

Closed yavko closed 6 months ago

yavko commented 6 months ago

I will merge only if someone informs me it works with both versions

AThePeanut4 commented 6 months ago

@yavko Can confirm this fixes the issue on the latest Hyprland git version, but it is no longer working on the latest Hyprland release (v0.39.1).

Looking at the changes, I believe this is because it's checking for the existence of $XDG_RUNTIME_DIR, which will exist on most Linux systems irrespective of which Hyprland version is being used. What it should instead do is build the entire $XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE path, and check whether that exists. And then do the same thing for the fallback paths starting with /run/user/$UID and /tmp.

yavko commented 6 months ago

That's funny because I actually had written a working version and then I listened to @outfoxxed who told me to switch them 😭

yavko commented 6 months ago

I'll update the code when I get home

outfoxxed commented 6 months ago

That's funny because I actually had written a working version and then I listened to @outfoxxed who told me to switch them 😭

Don't blame misreading what I wrote on me

shiro commented 6 months ago

Confirmed working with hyprland-git 0.39.1.r115.70ebc3ad-1, thanks for the quick fix :+1:

yavko commented 6 months ago

can someone please test new commit, thanks (BOTH VERSIONS PLZ)

ErrorNoInternet commented 6 months ago

Still works for me on old Hyprland (few commits before the XDG_RUNTIME_DIR change).

yavko commented 6 months ago

sick now i need confirmation it works on latest

AThePeanut4 commented 6 months ago

@yavko Can confirm working on both latest and on v0.39.1, although it won't work if you first run latest and then an older version without logging out, because the $XDG_RUNTIME_DIR/hypr directory that it's checking for won't be removed.

Whether that's an edge case worth caring about is up to you, Waybar's fix has the same issue as well.

yavko commented 6 months ago

@yavko Can confirm working on both latest and on v0.39.1, although it won't work if you first run latest and then an older version without logging out, because the $XDG_RUNTIME_DIR/hypr directory that it's checking for won't be removed.

Whether that's an edge case worth caring about is up to you, Waybar's fix has the same issue as well.

New commit should've fixed the edge case

yavko commented 6 months ago

Oof build errors, this is why you don't write code on your phone lmao

yavko commented 6 months ago

If you could test the edge case again that'd be sick

AThePeanut4 commented 6 months ago

@yavko Can confirm the edge case issue is no longer happening, works great on both Hyprland versions. Thanks for the fix :+1:

fiskhest commented 6 months ago

@yavko Can we get a new tagged build please?

yavko commented 6 months ago

@yavko Can we get a new tagged build please?

Alpha release probably tomorrow, I'm sorry if I don't get to it. It will be an alpha, as there are a ton of breaking changes, and I don't want to fully release 0.4 yet