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
25 changes: 19 additions & 6 deletions mpvpaper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ The plugin works on `wlr-layer-shell` compositors (Niri, Hyprland, Sway, Mango).

Assignments persist across restarts. Supported files: `mp4`, `webm`, `mkv`, `mov`, `gif`.

## IPC Commands

You can control the video wallpaper externally via Noctalia's IPC mechanism. Replace `[connector]` with your display name (e.g. `DP-1`), or omit it to target all monitors:

- `noctalia msg plugin noctalia/mpvpaper:service all pause [connector]` - Pauses playback via cgroups freezer.
- `noctalia msg plugin noctalia/mpvpaper:service all resume [connector]` - Resumes playback.
- `noctalia msg plugin noctalia/mpvpaper:service all toggle [connector]` - Toggles playback between paused and resumed state.
- `noctalia msg plugin noctalia/mpvpaper:service all clear <connector>` - Stops the wallpaper on the specified monitor and extracts a frame as a static wallpaper.
- `noctalia msg plugin noctalia/mpvpaper:service all clear-all` - Stops all active video wallpapers.

## Settings

| Setting | Type | Default | Description |
Expand All @@ -45,12 +55,15 @@ Assignments persist across restarts. Supported files: `mp4`, `webm`, `mkv`, `mov
| `hardware_decode` | `bool` | `true` | Uses `mpv` hardware decoding. |
| `auto_pause` | `bool` | `true` | Pauses playback while a fullscreen window covers the wallpaper. |
| `mpv_options` | `string` | *(empty)* | Additional space-separated `mpv` options. |
| `run_as_systemd` | `bool` | `false` | Runs instances inside systemd transient scopes (`systemd-run`) for resource control. |
| `extract_last_frame` | `bool` | `true` | Extracts a static frame to use as a wallpaper when video playback is stopped or paused. |
| `cpu_quota` | `number` | `0` | Systemd `CPUQuota=` limit in percentage. Requires `run_as_systemd`. |
| `allowed_cpus` | `string` | *(empty)* | Systemd `AllowedCPUs=` limits (e.g., `0-3`). Requires `run_as_systemd`. |
| `memory_max` | `string` | *(empty)* | Systemd `MemoryMax=` limits (e.g., `500M`). Requires `run_as_systemd`. |
| `cpu_weight` | `number` | `0` | Systemd `CPUWeight=` priority. Requires `run_as_systemd`. |
| `nice` | `number` | `0` | Process `nice` priority level. Requires `run_as_systemd`. |
| `glyph` | `glyph` | `movie` | Bar widget icon. |

## Notes
## How it works

A headless service supervises one long-lived helper process (`supervisor.sh`) that owns
every `mpvpaper` instance, one per output. The picker panel and bar widget are thin
clients that drive the service through the plugin's shared state. When the plugin is
disabled or Noctalia exits, the supervisor and all `mpvpaper` instances are torn down
together.
A headless service natively supervises `mpvpaper` instances (one per output), either launching them directly or wrapping them in systemd transient scopes (`systemd-run`) for strict CPU and memory resource limits. The picker panel and bar widget are thin clients that drive the service through the plugin's shared state. When the plugin is disabled or Noctalia exits, all `mpvpaper` instances are gracefully torn down together.
Loading