Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Need help with custom wallpaper setter #574

Open
ghost opened this issue Dec 21, 2020 · 2 comments
Open

Need help with custom wallpaper setter #574

ghost opened this issue Dec 21, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 21, 2020

Thank you for your work.
I wanted pywal to run automatically whenever the wallpaper is changed in gnome (via setting or wallpaper apps like fondo).
I have tried running gsettings get/gsettings monitor to get the path of the current wallpaper but have failed to find an efficient way of using automatically updating the terminal colors on wallpaper change.

help would be greatly appreciated.

@ghost
Copy link
Author

ghost commented Dec 21, 2020

to be clear... im currently using the following in my .zshrc

wal -q -i "$(gsettings get org.gnome.desktop.background picture-uri | grep -oP "://\K.*" | rev | cut -c2- |rev)"

I do not want to use wal to set the wallpaper, however, I'd like to know of a method to run wal whenever the wallpaper is changed via any other application. so that my currently opened applications (vs code/gnome-terminal/alacritty) are automatically themed on wallpaper change.

thanks!

@KiranWells
Copy link

Are you able to get the wallpaper successfully with that command? If you just need to find a good way to run it, you could try watching the file where gnome settings are stored (try this post for reference) and running the script when the file changes. I know tail has a -F option that follows the file and updates when it is changed; maybe there is another program that does something similar for scheduling.

Of course, the brute-force way to do it would be to simply run a check every second or so and run pywal if the file has changed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant