A simple bash script to set live video wallpapers on your Linux desktop using xwinwrap and mpv.
- Launch video wallpapers (
.mp4) as your desktop background. - Supports specifying wallpaper files or directories.
- Interactive menu to choose wallpapers from a directory.
- Kill/stop live wallpaper processes via script options or menu.
- Verbose debug output option for troubleshooting.
- Automatically detects screen resolution.
- No hardcoded directories — customizable via command line arguments.
Make sure these tools are installed:
xwinwrapmpvxdpyinfo
On Arch Linux, install them with:
paru -S shantz-xwinwrap-bzr mpv xorg-xdpyinfoor from shantanugoel.com
Run the script followed by optional flags:
./live-wallpaper.sh [options]`| Option | Description |
|---|---|
-v, --verbose |
Enable verbose debug output |
-d, --directory DIR |
Specify directory containing wallpapers (default: current directory) |
-f, --file FILE |
Specify a single wallpaper file to launch directly |
-k, --kill |
Kill all running live wallpaper processes (xwinwrap and mpv) |
-h, --help |
Show this help message and exit |
- Launch interactive wallpaper chooser from default directory:
./live-wallpaper.sh- Launch wallpaper chooser from a specific directory:
./live-wallpaper.sh -d wallpapers/- Launch a specific wallpaper file directly:
./live-wallpaper.sh -f Wallpapers/astronaut.mp4- Kill any running live wallpapers:
./live-wallpaper.sh --Kill- Enable verbose debug output:
./live-wallpaper.sh -v -d Wallpapers- Detects your screen resolution with
xdpyinfo. - Uses
xwinwrapto create a window pinned to the desktop background. mpvplays the specified video inside this window, looping silently without controls.- You can pick wallpapers interactively or specify directly.
- Use the kill option or menu to stop live wallpapers.
- Ensure
xwinwrap,mpv, andxdpyinfoare installed and working. - Verify wallpaper file paths are correct and accessible.
- If wallpapers don’t appear, check for errors related to
xwinwrapormpv. - Use the
--verboseflag to enable debug output and diagnose issues.
This project is provided as-is under the MIT License.
Enjoy your dynamic desktop wallpapers! 🎥🌌
