hyprland-community / hyprland-rs

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

[Event]: activespecial #111

Open fufexan opened 1 year ago

fufexan commented 1 year ago

What is the name of the event

activespecial

jules-sommer commented 4 months ago

I'm willing to add a few events if anyone wants to discuss with me how we want to handle many of the V2 events that I believe are still missing but fairly straightforward to implement. I made some changes and implemented a few missing events on a local fork for my own uses and am familiar with the code base. I was intending to write a PR but I wanted to check first if there was any consensus on how to handle the difference in data types that resulted from adding IDs and maybe various other parameters to the V2 events.

The IPC events as per Hyprland wiki for reference: https://wiki.hyprland.org/IPC/

I'm going from memory and I haven't looked at it in about a week or so, but I believe the types returned from the event handlers would either have to be extended to accommodate the added parameters in the V2 events and then the V1 would return a None option in that struct field or have a separate V2 type. Hence my wanting to discuss before a PR.

But I posted here so maybe I could pick up some of the other things needed as I'm very much interested in helping since I get use out of this lib and also am capable. That goes for events and anything else in the milestones you might need, would be happy to take a look!

~ Jules

yavko commented 4 months ago

I'm willing to add a few events if anyone wants to discuss with me how we want to handle many of the V2 events that I believe are still missing but fairly straightforward to implement. I made some changes and implemented a few missing events on a local fork for my own uses and am familiar with the code base. I was intending to write a PR but I wanted to check first if there was any consensus on how to handle the difference in data types that resulted from adding IDs and maybe various other parameters to the V2 events.

The IPC events as per Hyprland wiki for reference: https://wiki.hyprland.org/IPC/

I'm going from memory and I haven't looked at it in about a week or so, but I believe the types returned from the event handlers would either have to be extended to accommodate the added parameters in the V2 events and then the V1 would return a None option in that struct field or have a separate V2 type. Hence my wanting to discuss before a PR.

But I posted here so maybe I could pick up some of the other things needed as I'm very much interested in helping since I get use out of this lib and also am capable. That goes for events and anything else in the milestones you might need, would be happy to take a look!

~ Jules

Since 0.4 is a breaking release breaking changes are allowed, so you can literally do whatever, preferably I want to nuke the v1 events, and replace them with v2 events. Also activespecial is already implemented in my PR, so yeah

yavko commented 4 months ago

For more discussion you can join the discord in the readme

jules-sommer commented 4 months ago

I'm willing to add a few events if anyone wants to discuss with me how we want to handle many of the V2 events that I believe are still missing but fairly straightforward to implement. I made some changes and implemented a few missing events on a local fork for my own uses and am familiar with the code base. I was intending to write a PR but I wanted to check first if there was any consensus on how to handle the difference in data types that resulted from adding IDs and maybe various other parameters to the V2 events. The IPC events as per Hyprland wiki for reference: wiki.hyprland.org/IPC I'm going from memory and I haven't looked at it in about a week or so, but I believe the types returned from the event handlers would either have to be extended to accommodate the added parameters in the V2 events and then the V1 would return a None option in that struct field or have a separate V2 type. Hence my wanting to discuss before a PR. But I posted here so maybe I could pick up some of the other things needed as I'm very much interested in helping since I get use out of this lib and also am capable. That goes for events and anything else in the milestones you might need, would be happy to take a look! ~ Jules

Since 0.4 is a breaking release breaking changes are allowed, so you can literally do whatever, preferably I want to nuke the v1 events, and replace them with v2 events. Also activespecial is already implemented in my PR, so yeah

Okay, neat. Nuking the v1 is good with me, then I can just add the missing data to the event types that v2 additionally reports, IIRC it's things like ID and such.

Also in my local copy, I believe I was adding workspace and monitor related v2 events, which I needed for a hyprland plugin I was using the IPC for, did these get added in the main repo yet? if not I will clean up and revisit that code, the reason I never submitted the PR was because I pulled from upstream main seeing the changes there but not realizing that they were pretty significant and then everything broke due to conflicts and I didn't have the energy then to review them :laughing:. I also wasn't sure if I duplicated some work on the adding of events and such given the significant changes merged in.

So I will try to find some time to take a look at what I did and how it can be merged with the latest changes and then hopefully get a PR submitted for that. :relaxed: It probably won't be much work, even if I start over with the new consensus that v1 events can be scrapped.

thanks for the help!!!

~ Jules

yavko commented 4 months ago

I'm willing to add a few events if anyone wants to discuss with me how we want to handle many of the V2 events that I believe are still missing but fairly straightforward to implement. I made some changes and implemented a few missing events on a local fork for my own uses and am familiar with the code base. I was intending to write a PR but I wanted to check first if there was any consensus on how to handle the difference in data types that resulted from adding IDs and maybe various other parameters to the V2 events. The IPC events as per Hyprland wiki for reference: wiki.hyprland.org/IPC I'm going from memory and I haven't looked at it in about a week or so, but I believe the types returned from the event handlers would either have to be extended to accommodate the added parameters in the V2 events and then the V1 would return a None option in that struct field or have a separate V2 type. Hence my wanting to discuss before a PR. But I posted here so maybe I could pick up some of the other things needed as I'm very much interested in helping since I get use out of this lib and also am capable. That goes for events and anything else in the milestones you might need, would be happy to take a look! ~ Jules

Since 0.4 is a breaking release breaking changes are allowed, so you can literally do whatever, preferably I want to nuke the v1 events, and replace them with v2 events. Also activespecial is already implemented in my PR, so yeah

Okay, neat. Nuking the v1 is good with me, then I can just add the missing data to the event types that v2 additionally reports, IIRC it's things like ID and such.

Also in my local copy, I believe I was adding workspace and monitor related v2 events, which I needed for a hyprland plugin I was using the IPC for, did these get added in the main repo yet? if not I will clean up and revisit that code, the reason I never submitted the PR was because I pulled from upstream main seeing the changes there but not realizing that they were pretty significant and then everything broke due to conflicts and I didn't have the energy then to review them :laughing:. I also wasn't sure if I duplicated some work on the adding of events and such given the significant changes merged in.

So I will try to find some time to take a look at what I did and how it can be merged with the latest changes and then hopefully get a PR submitted for that. :relaxed: It probably won't be much work, even if I start over with the new consensus that v1 events can be scrapped.

thanks for the help!!!

~ Jules

ATM only workspaceremovedv2 and also activewindowv2 are added afaik

yavko commented 4 days ago

added in #177