-
-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: in hyprland/workspaces allow also for window title and regex #2561
Comments
That's totally doable! The reason I didn't include it at first was because I was unsure of how to introduce both configurations at once: should there be two configuration parameters (ex. Now that I gave it a second thought, maybe the following syntax? "window-rewrite": {
"class(firefox)": "",
"title(.*youtube)": ""
} I'd love your feedback on this. Later today I'll open a PR with that syntax, but I'm open for suggestions. |
Thank you for taking up my proposal! The syntax you suggested looks fine to me. Better than having two separate configuration parameters. An even more advanced feature would be to allow for a combination of titles/classes. Maybe something like:
where if you leave one of the two out, then it considers only classes or only titles. This combination could take precedence over the simple ones. |
That's a good idea. Though, rather than using My reasoning for that is: rather than writing a parser, I'll just use plain regex for matching. The window's final string to be matched against the rule will be constructed in runtime and look like this: Of course a parser would be a better solution, but it's hard to maintain a custom one and I'd rather not bring on a new C++ dependency (I'd love bringing https://github.com/wrsturgeon/inator 🦀 on, however). |
A slash or a whitespace both look like good solutions to me! |
Thanks for all your work on this! Now that I think of it, there could be another cool feature. Hyprctl also tells if the window is in fullscreen mode. It would be nice to have a graphical sign (asterisks, brackets, etc.) that tells when the window is maximized. |
While that would be pretty cool, I think Hyprland's socket2 could be a problem with this one. When a window enters/exists fullscreen, Hyprland's socket2 doesn't tell you which window: While we could find out which one by calling socket1, I think that could be avoided by contributing to Hyprland itself, thus simpliflying the implementation in Waybar. I'm saying this because getting the Window's updated title required the same solution and it feels wrong to have to re-do the same steps all the time. |
Could maybe another way be to retrieve the window id from the previous lines where it says the activewindow or the activewindowv2? Anyway, do not bother if it is too complicated and sorry that I cannot be of much assistance. |
Apologies for spamming this PR, but is it possible to have the same for |
I think that the recent commit on Hyprland dynamic window names on workspaces (58e506a) by @Syndelis was very cool. It works very well in my setup. If I understood correctly, at the moment it is only possible to use the window class to set the icon. Would it be possible/easy to add also the window title and/or allow for regex strings? I am sorry that I cannot help with this as I am not really proficient in coding.
The text was updated successfully, but these errors were encountered: