https://github.com/sin-ack/papertoy
Run a Shadertoy-compatible shader as an animated wallpaper on Wayland
https://github.com/sin-ack/papertoy
animated-wallpaper wayland
Last synced: 5 months ago
JSON representation
Run a Shadertoy-compatible shader as an animated wallpaper on Wayland
- Host: GitHub
- URL: https://github.com/sin-ack/papertoy
- Owner: sin-ack
- License: gpl-3.0
- Created: 2025-07-23T20:48:16.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-08-15T12:02:27.000Z (10 months ago)
- Last Synced: 2025-11-16T03:29:23.547Z (7 months ago)
- Topics: animated-wallpaper, wayland
- Language: Zig
- Homepage:
- Size: 79.1 KB
- Stars: 95
- Watchers: 1
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Papertoy
[](https://justforfunnoreally.dev)
Run a Shadertoy-compatible shader as an animated wallpaper on Wayland. Requires
running a wlroots-compatible Wayland compositor.
## Showcase
https://github.com/user-attachments/assets/8d6ae569-8fed-4ae5-aa11-4a3db6d13167
Shader: Balatro main menu background shader *(not publicly available)*

Shader: *Seascape* by TDM - https://www.shadertoy.com/view/Ms2SD1

Shader: *Auroras* by Nimitz - https://www.shadertoy.com/view/XtGGRt
## Dependencies
You'll most likely have these installed if you have a Wayland compositor anyway.
- Debian and variants: `libwayland-client0 libwayland-egl1 libegl1 libglvnd0 libffi8`
- Gentoo: `dev-util/wayland media-libs/glvnd dev-libs/libffi`
## Install
Either [download the latest release](https://github.com/sin-ack/papertoy/releases/latest) or follow the [build instructions below](#build).
Place `papertoy` somewhere in your `PATH` (e.g. `.local/bin`).
Once I'm happy with the stability I'll probably go for system packages.
## Usage
Run the binary with the path to a Shadertoy shader as an argument:
```console
$ zig-out/bin/papertoy /path/to/shader.glsl
```
> [!IMPORTANT]
> Currently, only shaders that don't use any channels are supported. This is
> being worked on.
Options:
- `--output `: Render to this Wayland output index (default: `0`)
- `--frame-rate `: Limit the frame rate of the shader (default: output refresh rate)
- `--resolution `: Limit the resolution the shader is rendered at (default: output native resolution)
## Build
### Nix
1. `nix run .`
2. There is no second step.
You can add the flake to your profile with: `nix profile install github:sin-ack/papertoy/`
### Bare metal
#### Dependencies
- Zig 0.15.2
- `libwayland`
- Debian and variants: `libwayland-dev`
- Gentoo: `dev-util/wayland`
- `libglvnd`
- Debian and variants: `libglvnd-dev`
- Gentoo: `media-libs/glvnd`
#### Steps
1. Install the listed dependencies above.
2. Clone the repository.
3. Run `zig build -Doptimize=ReleaseFast`
The binary will be located at `zig-out/bin/papertoy`.
## License
Copyright (c) 2025, sin-ack. Released under the GNU General Public License, version 3.
The Shadertoy preamble is from the Ghostty project. Copyright (c) 2024 Mitchell Hashimoto, License: MIT
The wlr-layer-shell-unstable-v1 protocol is from the wlr-protocols project. Copyright (c) 2017 Drew DeVault, License: MIT