-
Notifications
You must be signed in to change notification settings - Fork 41
feat(HyprlandService): support urgent event
#428
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
base: main
Are you sure you want to change the base?
Conversation
ignis/services/hyprland/service.py
Outdated
| def urgent_windows(self) -> list[str]: | ||
| """ | ||
| - read-only | ||
|
|
||
| A list of urgent windows. | ||
| """ | ||
| return list(self._urgent_windows) | ||
|
|
||
| @IgnisProperty | ||
| def urgent_workspaces(self) -> list[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should return a list of HyprlandWindow and HyprlandWorkspace accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be done in my latest commits.
ignis/services/hyprland/service.py
Outdated
| return list(self._urgent_windows) | ||
|
|
||
| @IgnisProperty | ||
| def urgent_workspaces(self) -> list[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, maybe HyprlandWindow and HyprlandWorkspace should simply have is_urgent property? Instead of making separate lists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that, how would you bind to urgent though? Do you just bind to the windows property at that point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HyprlandWindow (and HyprlandWorkspace) are GObjects too, so you can bind to them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wouldn't support binding to both properties under HyprlandWindow and the hyprland service though. I might be over-complicating it but how would I do what I'm doing in hyprland_workspaces() in the example bar?
Support a list of urgent windows and corresponding workspaces. Cancels the urgent flag when the urgent window becomes active.