I’ve just started experimenting with the Wayland compositor Hyprland and wanted to use my favorite wallpaper manager, Variety. Unfortunately, Variety does not support Hyprland out of the box. However, it’s easy to make it work also on Wayland.
I’m going to use Arch Linux in this blog post.
First of all, you must install “swaybg”, a wallpaper tool for Wayland compositors, and “variety”:
1 |
sudo pacman -S swaybg variety |
Now, start variety and do the first-time configuration. Currently, trying to change the wallpaper will not work.
Variety creates the directory “~/.config/variety/scripts”. Edit the file “set_wallpaper” inside that directory and search for the block starting like this:
1 |
if [[ -n $SWAYSOCK ]]; then |
Change it like that (you could also remove the part about SWAYSOCK if you want or if you don’t plan to use “sway” at all):
1 |
if [[ -n $SWAYSOCK || $XDG_CURRENT_DESKTOP == "Hyprland" ]] ; then |
This relies on the XDG_CURRENT_DESKTOP environment variable to be set accordingly, which should be like that automatically; you might want to check that:
1 2 |
echo $XDG_CURRENT_DESKTOP Hyprland |
Restart Variety, and now you can change the wallpaper!
Stay tuned for more posts on Hyprland 🙂
Pingback: Hyprland: getting started (part 1) | Lorenzo Bettini
Don’t forget to add ‘exec-once = variety &’ to your hyprland.conf so it starts up automatically the next time you start your computer 😉
Right! I was giving that for granted 😉