varietywalls / variety

Wallpaper downloader and manager for Linux systems
http://peterlevi.com/variety
GNU General Public License v3.0
1.12k stars 137 forks source link

Add an option to create a symlink/shortcut to the selected desktop image when the image changes. #700

Open guttermonk opened 2 months ago

guttermonk commented 2 months ago

Version of Variety you are using 0.8.12

Is your feature request related to a problem? Please describe. I would like to use the current desktop image on my lockscreen using Swaylock, and the current desktop image's colors to set my desktop color theme using Pywal. To do both of these things, I need a symlink to the current desktop image.

Describe the solution you'd like It would be nice if there was a toggle to create a symlink to the desktop image when it's set, at a specified file path.

Additional context In the meantime, please post below if anyone knows how would I modify the set_wallpaper script from Variety Wallpaper Changer (shown below) to create a symlink in ~/.cache/current_wallpaper to the newly set wallpaper image.

# Awesome Window Manager
# Be sure to start variety when you start awesome, such as by adding it to ~/.xinitrc
# NOTE: This config will change the wallpaper after your current awesome theme sets it.
# As such, the theme's wallpaper will briefly appear before being replaced with Variety's wallpaper.
if [[ "$XDG_SESSION_DESKTOP $DESKTOP_STARTUP_ID $DESKTOP_SESSION $XDG_CURRENT_DESKTOP" == *"awesome"* ]]; then
    echo "for s in screen do require(\"gears\").wallpaper.maximized(\"$1\", s) end" | awesome-client
fi