Hyprland
Hyprland copied to clipboard
Add layerrule ignorefocus
Describe your PR, what does it fix/add?
Adds a new layerrule for ignorefocus. This lets me script a fullscreen eww overlay like so:
preload_dashboard() {
eww open dashboard
hyprctl keyword layerrule ignorefocus,eww-dashboard # bypass interaction
}
show_dashboard() {
hyprctl keyword blurls eww-dashboard # enable blur
hyprctl keyword layerrule unset,eww-dashboard # allow interaction
eww update reveal=true # show dashboard
}
hide_dashboard() {
eww update reveal=false #hide dashboard
hyprctl keyword blurls remove,eww-dashboard # remove blur
hyprctl keyword layerrule ignorefocus,eww-dashboard # bypass interaction
}
with a defwindow that looks like:
(defwindow dashboard
:monitor 0
:geometry (geometry :x "0px" :y "0px" :width "100%" :height "100%" :anchor "center")
:stacking "ov"
:windowtype "dock"
:focusable true
:namespace "eww-dashboard"
(container
(system)))
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Tested a bunch of different focus/unfocus scenarios. I think I got all the edge cases.
Also fixed a bug where layerrules were not being applied when unset.
Is it ready for merging, or does it need work?
Ready for merging. Not very risky because logic should be the same for anyone not invoking the new ignorefocus rule.