Some scripts to make setting a video/gif as your wallpaper on linux easier.
Tested working on Arch with:
- Gnome (supports wayland)
- Xfce
- Cinnamon (works with desktop icons)
- KDE (recommend to use this instead)
- Mate
- Xmonad
- Qtile
- i3
- Herbstluftwm
- Awesome
- dwm
Not tested on other distros and BSPWM
- xwinwrap-git (AUR)
- mplayer/mpv
- ffmpeg
- gifsicle
- xclip
- vlc (optional)
- Wallpaper Engine (optional but recommended)
- Clone the repository
- Make install.sh executable if needed
- Run install.sh
- Add wallhelper to your path if you want
This script is meant to be used together with wallpaper engine to make things easier when setting a video as your wallpaper.
It can also add wallpapers manually without wallpaper engine if you specify the path using wallhelper -a <path_to_mp4/gif>
.
-
Make sure the wallpaper you want to preview is already downloaded in your steam library
-
- Copy the url of the wallpaper you want to preview, and run the wallhelper script using the following command:
wallhelper -p
. - Alternatively, you can also specify the wallpaper id as an argument to the script:
wallhelper -p <wallpaper_id>
. The wallpaper id can be found in the url of any wallpapers you subscribed to.
- Copy the url of the wallpaper you want to preview, and run the wallhelper script using the following command:
-
The script will open mplayer/vlc to preview your wallpaper.
-
Make sure wallpaper engine is downloaded and in your steam library
-
Go to wallpaper engine properties and enable 'Force the use of a specific Steam Play compatability tool' in the Compatability tab
-
Visit the Wallpaper Engine Workshop, login and browse for a video you want to use as your wallpaper. (Note: Filter by 'Video' format since this script does not support any other format such as scene or html)
-
Subscribe to a wallpaper you like and wait for it to finish downloading
-
- Copy the url of the wallpaper you just subscribed to, and run the wallhelper script using the following command:
wallhelper
.
- Alternatively, you can also specify the wallpaper id as an argument to the script:
wallhelper <wallpaper_id>
. The wallpaper id can be found in the url of any wallpapers you subscribed to.
- Copy the url of the wallpaper you just subscribed to, and run the wallhelper script using the following command:
-
The script will now look for the wallpaper in your steam workshop folder and copy it to
~/.config/video-wallpapers/wallpapers/
. You can use setwall script to cycle through the wallpapers in this folder.
If you want to add your own video/gif as a wallpaper, you can use the following command: wallhelper -a <path_to_mp4/gif>
. This will copy the video/gif to ~/.config/video-wallpapers/wallpapers/
.
The script can also read the video/gif directory from the clipboard if you use wallhelper -a
or wallhelper
without any arguments.
- Run the wallhelper script using the following command:
wallhelper -o
. - This will optimize the last added wallpaper in
~/.config/video-wallpapers/wallpapers/
using ffmpeg if it's a mp4 or gifsicle if it's a gif.
You can:
- Optimize all wallpapers in the wallpaper directory using
wallhelper -o all
- Optimize all gifs in the wallpaper directory using
wallhelper -o gif
- Optimize all mp4s in the wallpaper directory using
wallhelper -o mp4
Gifs must be optimized so that it is at your screen resolution, it will not auto stretch to your screen resolution!
- Run the wallhelper script using the following command:
wallhelper -d
. - This will delete the last added wallpaper in
~/.config/video-wallpapers/wallpapers/
. - Alternatively, you can use
wallhelper -d <wallpaper-number>
to delete a specific wallpaper. (Note: The wallpaper number is the number in the name of the wallpaper in~/.config/video-wallpapers/wallpapers/
, it is not the same as wallpaper id)
The script can also be used without wallpaper engine. However, you will only be able to use the optimizing, custom adding and deleting functions of the script.
To add a wallpaper without having wallpaper engine:
- Download a video you want to use as your wallpaper
- Use the following command:
wallhelper -a <path_to_mp4/gif>
- Alternatively, you can also use
wallhelper -a
and the script will read the path from the clipboard
- Download a video you want to use as your wallpaper
- Move the video to
~/.config/video-wallpapers/wallpapers/
- Rename the video so that it is incremental (e.g. 1.mp4, 2.mp4, 3.mp4, etc.)
Deletion and optimization works the same as with wallpaper engine.
This script is used to cycle through wallpapers in ~/.config/video-wallpapers/wallpapers/
and set them as your wallpaper. It now supports mp4 and gif.
If you want to set a specific video/gif in ~/.config/video-wallpapers/wallpapers/
as your wallpaper, add the corresponding number as an argument. (eg. to set 1.mp4 as the wallpaper, run ~/.config/video-wallpapers/setwall 1
)
Gif wallpapers are implemented using gifview and mp4 wallpapers are implemented using mplayer/mpv. I hope to implement html wallpapers in the future.
Change the 'VIDEOPLAYER' variable in the script to change the video player used, default is mplayer. (e.g. mpv, mplayer)
Gifs must be optimized so that it is at your screen resolution, it will not auto stretch to your screen resolution!
It is recommended to use this script with a keybind. (e.g. Super+Alt+W)
Either add the following to your xprofile:
$HOME/.config/video-wallpapers/setwall startup
Or make a .desktop file in ~/.config/autostart/
with the following content:
[Desktop Entry]
Type=Application
Name=setwall
Exec=$HOME/.config/video-wallpapers/setwall startup
X-GNOME-Autostart-enabled=true
Comment=Script to set wallpaper
Base on my tests, mplayer only takes up less tha 300MB RAM. It should not cause significant slowdowns on your system.
Mpv made my system slow down much more than mplayer, therefore i decided to use mplayer instead. You could try using mpv and see if it works better for you.