Casey J Robinson / how i got waypaper to trigger pywal and sync it with my lockscreen

Created Thu, 12 Feb 2026 17:45:21 -0600 Modified Wed, 25 Feb 2026 15:46:32 +0000
304 Words

Summary

I wanted a way to change the colors of my applications and also sync my wallpaper with my lockscreen. So I spent a few hours tinkering with Waypaper.

Every attempt I found online wanted me to use a separate bash script and have Waypaper trigger it. That was annoying, and I don’t want a bunch of random scripts on my PC. Since Waypaper can trigger commands directly, I decided to just use that instead.

You will add this to the post_command line.


Pywal

Go to your waypaper.ini file and edit it.

Here is the basic pywal configuration:

post_command = wal -i "$wallpaper" -n

This is just the standard pywal command, but with a variable name instead of a hardcoded image path.

"$wallpaper" is the variable name for the current wallpaper. It automatically passes the selected image to wal and sets the colors appropriately.


Lockscreen

This function copies the file to a directory. I have it rewrite the contents of the file every time I choose a different wallpaper so Hyprlock can use it.

cp "$wallpaper" /home/casey/.cache/lockscreen.jpg

Or the symlink version:

ln -sf "$wallpaper" /home/casey/.cache/lockscreen.jpg

Right now I’m copying the wallpaper, but I may switch to the symlink version later. You don’t have to name the file the same as mine.

Again, "$wallpaper" is the variable name of the current wallpaper. It equals the image path, so you could replace it with a direct wallpaper path if you wanted.

Go and add the file path to your hyprlock.conf.


Final Command I Used

Here is the command I ended up using:

cp "$wallpaper" /home/casey/.cache/lockscreen.jpg && /home/casey/.nix-profile/bin/wal -i "$wallpaper" -n

This copies the wallpaper to a static file for Hyprlock and then runs pywal using my Nix-installed version.

Now whenever I change my wallpaper in Waypaper:

  • My colors update
  • My lockscreen updates
  • Everything stays in sync