hyprwm / hyprpaper

Hyprpaper is a blazing fast wayland wallpaper utility with IPC controls.
https://wiki.hyprland.org/Hypr-Ecosystem/hyprpaper/
BSD 3-Clause "New" or "Revised" License
792 stars 56 forks source link

Regression (?) in `0.6.0` #126

Closed simonwiles closed 9 months ago

simonwiles commented 10 months ago

Hi :) thanks for Hyprland -- I've not had so much fun with my desktop in ages :)

Having upgraded from 0.5.0 to 0.6.0, this incantation (that I've been using in exec-once and in a bind) has stopped working:

zsh -c 'exec hyprpaper -c <(wp=$(shuf -en1 ~/wallpaper/*) && echo "ipc=off\npreload=$wp\nwallpaper=,$wp")'

It now reports:

[WARN] Monitor eDP-1 does not have a target! A wallpaper will not be created.

If I revert to 0.5.0 then it works just fine again.

I assume this is related to the new dependency on hyprlang? I Is it likely you'd consider this some that that needs "fixing", or shall I just work around it?

Thanks!

vaxerski commented 10 months ago

my bash knowledge kinda sucks what the fuck does that do?

-c takes a path to a config file, I don't see you doing any files there? looks like you passing the actual config contents to -c?

simonwiles commented 10 months ago

sorry; ~it's a zsh-specific thing (doesn't work in bash)~ -- <(...) is form of process substitution that creates a named pipe (cf. e.g. https://zsh.sourceforge.io/Intro/intro_7.html), such that the construction is replaced on the command line by a named pipe whose contents are the output of the process inside the <(...).

On reflection, it's perhaps a bit abstruse (and there are lots of ways to work around it, I suppose); but it does work on 0.5.0 and it doesn't on 0.6.0, so it might be worth being aware of, at least.

In the end, all I want is a random file from ~/wallpapers displayed on all screens (ideally, with as few intermediary processes and files as possible).

edit: I was wrong, the same construction does exist in bash, sorry. Same results when using bash, though, as expected -- it works on 0.5.0 and fails on 0.6.0.

vaxerski commented 10 months ago

possibly because we use std::filesystem::canonical on the file? Maybe that doesn't work well with pipes. Why not just echo it to /tmp/hpconfig.conf?

simonwiles commented 10 months ago

Yeah, I can totally do that -- in fact, with zsh (but not with bash -- I'm sure about that this time!) I can use use =(...) instead of <(...) and it will write out a temp file and pass the filename in (and delete it when the process closes). I just decided to avoid the need for the additional temp file when I first set it up.

It seems reasonably likely that this is the only side-effect of the 0.5.00.6.0 changes, and also that there won't be many (if any) others affected, so I'm cool with closing this as "won't fix" or "not a bug".