Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ tracy-client = { version = "0.18.4", default-features = false }

[workspace.dependencies.smithay]
# version = "0.4.1"
git = "https://github.com/Smithay/smithay.git"
git = "https://github.com/YaLTeR/smithay.git"
# path = "../smithay"
rev = "5f784c9ad6ae619c880e4713e120b281e2ce5383"
default-features = false

[workspace.dependencies.smithay-drm-extras]
Expand Down Expand Up @@ -93,6 +94,7 @@ tracing-subscriber.workspace = true
tracing.workspace = true
tracy-client.workspace = true
wayland-backend = "0.3.12"
wayland-protocols-plasma = { version = "0.3.10", features = ["server"] }
wayland-scanner = "0.31.8"
xcursor = "0.3.10"
zbus = { version = "5.13.0", optional = true }
Expand Down
1 change: 1 addition & 0 deletions docs/mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ nav:
- Xwayland: Xwayland.md
- Gestures: Gestures.md
- Fullscreen and Maximize: Fullscreen-and-Maximize.md
- Window Effects: Window-Effects.md
- Packaging niri: Packaging-niri.md
- Integrating niri: Integrating-niri.md
- Accessibility: Accessibility.md
Expand Down
50 changes: 50 additions & 0 deletions docs/wiki/Configuration:-Layer-Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Here are all matchers and properties that a layer rule could have:
layer-rule {
match namespace="waybar"
match at-startup=true
match layer="top"

// Properties that apply continuously.
opacity 0.5
Expand All @@ -34,6 +35,13 @@ layer-rule {
geometry-corner-radius 12
place-within-backdrop true
baba-is-float true

background-effect {
xray true
blur true
noise 0.05
saturation 3
}
}
```

Expand Down Expand Up @@ -69,6 +77,22 @@ layer-rule {
}
```

#### `layer`

<sup>Since: next release</sup>

Matches surfaces on this layer-shell layer.
Can be `"background"`, `"bottom"`, `"top"`, or `"overlay"`.

```kdl
// Make all overlay-layer surfaces FLOAT.
layer-rule {
match layer="overlay"

baba-is-float true
}
```

### Dynamic Properties

These properties apply continuously to open layer-shell surfaces.
Expand Down Expand Up @@ -191,3 +215,29 @@ layer-rule {
baba-is-float true
}
```

#### `background-effect`

<sup>Since: next release</sup>

Override the background effect options for this surface.

- `xray`: set to `true` to enable the xray effect, or `false` to disable it.
- `blur`: set to `true` to enable blur behind this surface, or `false` to force-disable it.
- `noise`: amount of pixel noise added to the background (helps with color banding from blur).
- `saturation`: color saturation of the background (`0` is desaturated, `1` is normal, `2` is 200% saturation).

See the [window effects page](./Window-Effects.md) for an overview of background effects.

```kdl
// Make top and overlay layers use the regular blur (if enabled),
// while bottom and background layers keep using the efficient xray blur.
layer-rule {
match layer="top"
match layer="overlay"

background-effect {
xray false
}
}
```
86 changes: 86 additions & 0 deletions docs/wiki/Configuration:-Miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ hotkey-overlay {
config-notification {
disable-failed
}

blur {
// off
passes 3
offset 3.0
noise 0.02
saturation 1.5
}
```

### `spawn-at-startup`
Expand Down Expand Up @@ -320,3 +328,81 @@ config-notification {
disable-failed
}
```

### `blur`

<sup>Since: next release</sup>

Blur configuration that affects all background blur.

See the [window effects page](./Window-Effects.md) for an overview of background effects.

```kdl
blur {
// off
passes 3
offset 3
noise 0.02
saturation 1.5
}
```

#### `off`

By default, blur is available on request by a window or layer surface (via the `ext-background-effect` protocol).
You can also enable it manually with the `blur true` background effect [window](./Configuration:-Window-Rules.md#background-effect) or [layer](./Configuration:-Layer-Rules.md#background-effect) rule.

Setting the `off` flag will disable all blur, both requested by the window, and configured in window rules.

```kdl
blur {
off
}
```

#### `passes` and `offset`

`passes` contols the number of downsample/upsample passes for dual kawase blur.
More passes produce a larger, smoother blur, but cost more GPU resources.

`offset` is the pixel offset multiplier for each pass.
Offset `1` is the original dual kawase blur.
Larger values produce a smoother blur, at no additional GPU cost.

However, setting `offset` too big will produce visual artifacts.
You will need to increase `passes` to be able to use a bigger `offset` without artifacts.

When configuring blur, try increasing `offset` first (since it doesn't cause any extra GPU load) until you start getting artifacts.
Then, if you still need smoother blur, increase `passes` by 1.
Keep doing this until you get the desired visuals.

```kdl
blur {
passes 3
offset 3.0
}
```

#### `noise`

Amount of noise to add on top of the blur.

This is helpful to reduce color banding artifacts.

```kdl
blur {
noise 0.02
}
```

#### `saturation`

Color saturation applied to the blurred background.

Values above `1` increase saturation; values below `1` reduce it.

```kdl
blur {
saturation 1.5
}
```
32 changes: 32 additions & 0 deletions docs/wiki/Configuration:-Window-Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ window-rule {
tiled-state true
baba-is-float true

background-effect {
xray true
blur true
noise 0.05
saturation 3
}

min-width 100
max-width 200
min-height 300
Expand Down Expand Up @@ -909,6 +916,31 @@ https://github.com/user-attachments/assets/3f4cb1a4-40b2-4766-98b7-eec014c19509

</video>

#### `background-effect`

<sup>Since: next release</sup>

Override the background effect options for this window.

- `xray`: set to `true` to enable the xray effect, or `false` to disable it.
- `blur`: set to `true` to enable blur behind this window, or `false` to force-disable it.
- `noise`: amount of pixel noise added to the background (helps with color banding from blur).
- `saturation`: color saturation of the background (`0` is desaturated, `1` is normal, `2` is 200% saturation).

See the [window effects page](./Window-Effects.md) for an overview of background effects.

```kdl
// Make floating windows use the regular blur (if enabled),
// while tiled windows keep using the efficient xray blur.
window-rule {
match is-floating=true

background-effect {
xray false
}
}
```

#### Size Overrides

You can amend the window's minimum and maximum size in logical pixels.
Expand Down
Loading