scenefx: rebase against v0.8

This commit is contained in:
wochap 2024-12-25 16:44:04 +00:00
parent 494baec5b1
commit abf142827c

View File

@ -1,96 +1,111 @@
### Description ### Description
Implement https://github.com/wlrfx/scenefx Implement https://github.com/wlrfx/scenefx
```c ```c
/* available options */ /* available options */
static const int opacity = 0; /* flag to enable opacity */ static const int opacity = 0; /* flag to enable opacity */
static const float opacity_inactive = 0.5; static const float opacity_inactive = 0.5;
static const float opacity_active = 1.0; static const float opacity_active = 1.0;
static const int shadow = 1; /* flag to enable shadow */ static const int shadow = 1; /* flag to enable shadow */
static const int shadow_only_floating = 0; /* only apply shadow to floating windows */ 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 = COLOR(0x0000FFff);
static const struct wlr_render_color shadow_color_focus = COLOR(0xFF0000ff); static const struct wlr_render_color shadow_color_focus = COLOR(0xFF0000ff);
static const int shadow_blur_sigma = 20; static const int shadow_blur_sigma = 20;
static const int shadow_blur_sigma_focus = 40; static const int shadow_blur_sigma_focus = 40;
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 corner_radius = 0; /* 0 disables corner_radius */ static const int corner_radius_inner = 3; /* 0 disables corner_radius */
static const int blur = 1; /* flag to enable blur */ static const int blur = 1; /* flag to enable blur */
static const int blur_optimized = 1; static const int blur_optimized = 1;
static const int blur_ignore_transparent = 1; static const int blur_ignore_transparent = 1;
static const struct blur_data blur_data = { static const struct blur_data blur_data = {
.radius = 5, .radius = 5,
.num_passes = 3, .num_passes = 3,
.noise = 0.02, .noise = 0.02,
.brightness = 0.9, .brightness = 0.9,
.contrast = 0.9, .contrast = 0.9,
.saturation = 1.1, .saturation = 1.1,
}; };
``` ```
> **NOTE:** If you are using nix with flakes, scenefx has a flake for scenefx https://github.com/wlrfx/scenefx/blob/main/flake.nix > **NOTE:** If you are using nix with flakes, scenefx has a flake for scenefx https://github.com/wlrfx/scenefx/blob/main/flake.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:** Blur doesn't work on windows with opacity set (opacity_active, opacity_inactive) > **NOTE:** In DWL's Makefile `scenefx` must be placed before `wlroots-0.18`, e.g. `PKGS = scenefx wlroots-0.18 wayland-server ...`
> **NOTE:** In DWL's Makefile `scenefx` must be placed before wlroots, e.g. `PKGS = scenefx wlroots wayland-server ...` <details>
<summary>Preview</summary>
<details> <pre>
<summary>Preview</summary> <img src="https://i.imgur.com/nJIX6lp.png"/>
<pre> </pre>
<img src="https://i.imgur.com/4kFhSaS.png"/> </details>
<img src="https://i.imgur.com/9ZQAUXx.png"/>
</pre> ### Download
</details>
- [git branch](https://codeberg.org/wochap/dwl/src/branch/v0.8-a/scenefx)
### Download
- [0.8](https://codeberg.org/dwl/dwl-patches/raw/commit/494baec5b107114b74d243440aa8581fe6c03e48/patches/scenefx/scenefx.patch)
- [git branch](https://codeberg.org/wochap/dwl/src/branch/v0.5/scenefx)
- [2024-07-09](https://codeberg.org/dwl/dwl-patches/raw/commit/13d96b51b54500dd24544cf3a73c61b7a1414bc6/patches/scenefx/scenefx.patch) **NOTE:** This patch was tested with the `b2e0ac4beb85aa89d0357dc8fcf8762808650890` commit on the `main` branch of `SceneFX`. It supports rounded borders, blur, and shadows.
**IMPORTANT:** This patch only works with the `2ec3505248e819191c37cb831197629f373326fb` commit on the `main` branch of `scenefx`, therefore, it does not support **blur**. **IMPORTANT:** This patch requires you to build DWL with the following dependencies
**IMPORTANT:** This patch requires you to build DWL with the following dependencies - **scenefx**
- libGL
- **scenefx**
- libGL - [2024-07-09](https://codeberg.org/dwl/dwl-patches/raw/commit/13d96b51b54500dd24544cf3a73c61b7a1414bc6/patches/scenefx/scenefx.patch)
- [2024-04-11](https://codeberg.org/dwl/dwl-patches/raw/commit/6e3a57ffd16dafa31900b7e89e51672bd7bcc1e8/scenefx/scenefx.patch) **IMPORTANT:** This patch only works with the `2ec3505248e819191c37cb831197629f373326fb` commit on the `main` branch of `scenefx`, therefore, it does not support **blur**.
**IMPORTANT:** This patch only works with the `de4ec10e1ff9347b5833f00f8615d760d9378c99` commit on the `wlr_scene_blur` branch of `scenefx`, as it adds support for **blur**. **IMPORTANT:** This patch requires you to build DWL with the following dependencies
**IMPORTANT:** This patch requires you to build DWL with the dependencies of WLROOTS: - **scenefx**
- libGL
- **scenefx**
- libGL <details>
- libcap <summary>Preview</summary>
- libinput <pre>
- libpng <img src="https://i.imgur.com/4kFhSaS.png"/>
- libxkbcommon <img src="https://i.imgur.com/9ZQAUXx.png"/>
- mesa </pre>
- pixman </details>
- seatd
- vulkan-loader - [2024-04-11](https://codeberg.org/dwl/dwl-patches/raw/commit/6e3a57ffd16dafa31900b7e89e51672bd7bcc1e8/scenefx/scenefx.patch)
- wayland
- wayland-protocols **IMPORTANT:** This patch only works with the `de4ec10e1ff9347b5833f00f8615d760d9378c99` commit on the `wlr_scene_blur` branch of `scenefx`, as it adds support for **blur**.
- xorg.libX11
- xorg.xcbutilerrors **IMPORTANT:** This patch requires you to build DWL with the dependencies of WLROOTS:
- xorg.xcbutilimage
- xorg.xcbutilrenderutil - **scenefx**
- xorg.xcbutilwm - libGL
- xwayland (optional) - libcap
- ffmpeg - libinput
- hwdata - libpng
- libliftoff - libxkbcommon
- libdisplay-info - mesa
- pixman
- [v0.5](https://codeberg.org/dwl/dwl-patches/raw/commit/7a5c3420822074c544fa102e030b7c30aa6b6be8/scenefx/scenefx.patch) - seatd
- vulkan-loader
### Authors - wayland
- wayland-protocols
- [wochap](https://codeberg.org/wochap) - xorg.libX11
- xorg.xcbutilerrors
- xorg.xcbutilimage
- xorg.xcbutilrenderutil
- xorg.xcbutilwm
- xwayland (optional)
- ffmpeg
- hwdata
- libliftoff
- libdisplay-info
- [v0.5](https://codeberg.org/dwl/dwl-patches/raw/commit/7a5c3420822074c544fa102e030b7c30aa6b6be8/scenefx/scenefx.patch)
### Authors
- [wochap](https://codeberg.org/wochap)