anyrun-org / anyrun

A wayland native, highly customizable runner.
GNU General Public License v3.0
560 stars 44 forks source link

Cannot apply blur to anyrun #146

Open ClaireNeveu opened 2 months ago

ClaireNeveu commented 2 months ago

Anyrun opens a fullscreen window then makes most of it transparent. This means any attempt to apply blurred transparency to anyrun blurs the whole screen. Other launchers like Tofi allow you to control the size of the opened window/layer so transparency blur is only applied to the actual launcher.

anyrun-blur

ClaireNeveu commented 2 months ago

You should be able to achieve positioning without fullscreen by anchoring to all four edges and then setting the margins from those edges.

See https://docs.rs/gtk-layer-shell/0.8.0/gtk_layer_shell/trait.LayerShell.html#method.set_anchor and https://docs.rs/gtk-layer-shell/0.8.0/gtk_layer_shell/trait.LayerShell.html#method.set_layer_shell_margin

Kirottu commented 2 months ago

Anyrun formerly used this way of anchoring to an edge on the display, but I changed it to use this method to allow for more freedom with positioning the window and more specifically to make the centered mode more feasible (with the anchoring method, centering with a variable window size, as Anyrun has, becomes incredibly jarring with the input field shifting as the results change)

ClaireNeveu commented 2 months ago

FWIW I hacked together a kick and dirty POC and the input field doesn't shift at all when the results change.

TheRealGramdalf commented 2 months ago

Out of curiosity (I'd like to steal borrow the transparency CSS), what's your config for the blur effect? I'm not a CSS wizard, despite the name.