On hyprland, I’m trying to point the image command in the swaylock config to my current wallpaper. I.E. image = [PATH TO CURRENT WALLPAPER].
Ok, so…I’m using azote to set my background in hyprland and it’s set to use the same location I use for Gnome backgrounds. Namely $HOME/.local/share/backgrounds.
I can use sed to get the information from azote as follows:
sed -n ‘/path/p’ $HOME/.local/share/azote/swabg.json
So far, so good. I run that command and I get this output.
The task I’m trying to figure out is how to first extract just that path from that string and then carry it over to my swaylock config for it to use to set as my image when the screen is locked.
Going through what docs I can find but, if anyone has any pointers, would be appreciated
there’s a man page for jq…see what I can figure out.
Oh and, yes, I do realize that something like “grep backgrounds $HOME/.local/share/azote/swaybg.json” will get me the same output I got with sed but, I think I"m going to need sed (or maybe jq) to extract exactly what I need out of it.
I’d recommend jq because it is easier (once you study it), but with sed and its friends (awk, cut, grep, …) it is possible too.
Both ways something to learn.
Edit: this might work (but jq is generally more useful for json):
I’d thought you needed something like egrep to do any actual manipulation. Thanks
In any event, this was enough. Made the appropriate edits in my “lockscreen” file in /scripts and the config file in /swaylock and it’s working that want. Thanks for your help