From daac32133794176e9d84634387ef654c6b6c44ff Mon Sep 17 00:00:00 2001 From: wochap Date: Wed, 10 Apr 2024 16:09:34 +0000 Subject: [PATCH] Update scenefx --- scenefx.md | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/scenefx.md b/scenefx.md index 416b2bc..cbdd9e7 100644 --- a/scenefx.md +++ b/scenefx.md @@ -1,22 +1,42 @@ ### Description -Implement https://github.com/wlrfx/scenefx (commit 7e723f983b074e62e676caffe21cd5527b524587) in DWL, for now, it only implements drop shadows. +Implement https://github.com/wlrfx/scenefx (commit de4ec10e1ff9347b5833f00f8615d760d9378c99) in DWL. ```c /* available options */ -static const int shadow = 1; -static const int shadow_only_floating = 0; + +static const int opacity = 0; /* flag to enable opacity */ +static const float opacity_inactive = 0.5; +static const float opacity_active = 1.0; + +static const int shadow = 1; /* flag to enable shadow */ +static const int shadow_only_floating = 0; /* only apply shadow to floating windows */ static const struct wlr_render_color shadow_color = COLOR(0x0000FFff); static const struct wlr_render_color shadow_color_focus = COLOR(0xFF0000ff); static const int shadow_blur_sigma = 20; static const int shadow_blur_sigma_focus = 40; -static const char *const shadow_ignore_list[] = { "xdg-desktop-portal-gtk", "cpupower-gui", NULL }; /* list of app-id to ignore */ -static const int corner_radius = 0; +static const char *const shadow_ignore_list[] = { "xdg-desktop-portal-gtk", NULL }; /* list of app-id to ignore */ + +static const int corner_radius = 0; /* 0 disables corner_radius */ + +static const int blur = 1; /* flag to enable blur */ +static const int blur_optimized = 1; +static const int blur_ignore_transparent = 1; +static const struct blur_data blur_data = { + .radius = 5, + .num_passes = 3, + .noise = 0.02, + .brightness = 0.9, + .contrast = 0.9, + .saturation = 1.1, +}; ``` > **NOTE:** If you are using nix, I have packaged scenefx https://github.com/wochap/nix-config/blob/main/packages/scenefx/default.nix > **NOTE:** Some GTK apps are being cut off when they have shadows enabled. You can use the `shadow_ignore_list` option to prevent shadows from being rendered on those apps +> **NOTE:** Blur doesn't work on windows with opacity set (opacity_active, opacity_inactive) + > **NOTE:** `scenefx` must be placed before wlroots **IMPORTANT:** This patch requires you to build DWL with the dependencies of WLROOTS: @@ -46,13 +66,14 @@ static const int corner_radius = 0;
Preview
+
 
 
### Download - [git branch](https://codeberg.org/wochap/dwl/src/branch/v0.5/scenefx) -- [v0.5](https://codeberg.org/dwl/dwl-patches/raw/commit/45d849cab5074bb5715e931805cfbafb63da60b1/scenefx/scenefx.patch) +- [v0.5](https://codeberg.org/dwl/dwl-patches/raw/commit/5368aa392c7ebf8d7d24c232b80cfae1be457d41/scenefx/scenefx.patch) ### Authors - [wochap](https://codeberg.org/wochap)