feat: add hyprland support and leave space for other compositors#1
Open
Matra-Master wants to merge 1 commit intocodeafridi:mainfrom
Open
feat: add hyprland support and leave space for other compositors#1Matra-Master wants to merge 1 commit intocodeafridi:mainfrom
Matra-Master wants to merge 1 commit intocodeafridi:mainfrom
Conversation
The main thing is not using xdotool in a wayland environment. That's what the script change does. Then for function `get_active_pid()` used XDG variables to get the session type and desktop. First if session is wayland and then if desktop is hyprland. I made a match-case so others can include their own desktops. I have only hyprland and don't want to make cases that I'm not able to test myself.
Owner
|
This is a good addition but before merging one important change is that the current implementation uses grep -P with shell=True which is fragile and depends on external tools. It would be better to use: hyprctl activewindow -j and parse the JSON output in Python instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change to
start_overlay.shis about not asking for xdotool in a wayland environment.Then for function
get_active_pid()used XDG variables to get the session type and desktop. First if session is wayland and then if desktop is hyprland.I made a match-case so others can include their own desktops. I have only hyprland and don't want to make cases that I'm not able to test myself.
Please check if your X11 session keeps working as expected. I supposed it still works for you.
--
I started this change with AI to get the idea and then ended up changing things manually to optimize the hyprland command and to put a match-case for others.