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
724 stars 53 forks source link

Double output of files on hyprctl hyprpaper listactive #138

Open justinesmithies opened 5 months ago

justinesmithies commented 5 months ago

I'm using the latest Hyprpaper from git ( built from commit 1013a80608891f120184aa7c1a7cfde04bfc96fb ) and when I run the following commands I seem to get a double output on the last screen ??

read -r wallpaper<~/.cache/test
hyprctl hyprpaper preload $wallpaper
hyprctl hyprpaper wallpaper ", $wallpaper"
hyprctl hyprpaper unload all

As you can see the eDP-1 screen shows two lots of path info and I'm not sure if this is consuming more memory because of what's been shown ?

╭─justine@justine-laptop ~ 
╰> hyprctl hyprpaper listactive
HDMI-A-1 = /home/justine/Pictures/Wallpapers/CKysMRCr.png
eDP-1 = /home/justine/Pictures/Wallpapers/CKysMRCr.png
 = /home/justine/Pictures/Wallpapers/CKysMRCr.png

I thought the output of hyprctl hyprpaper listactive should look like the following ?

HDMI-A-1 = /home/justine/Pictures/Wallpapers/CKysMRCr.png
eDP-1 = /home/justine/Pictures/Wallpapers/CKysMRCr.png

Not as it currently displays ?

Also noted from the log of Hyprpaper is this line:

[LOG] numWallpapersActive: 3

When I only have two screens HDMI-A-1 and eDP-1

stephentoth commented 5 months ago

So, the addition of the listactive command was strictly pulling information from hyprpaper and shouldn't have affected anything else or changed how much memory is being used by itself. I can replicate the bug and it happens on the changewallpaper. I think this might of been an existing bug that's being exposed.

On my end:

$ hyprpaper &

$ hyprctl hyprpaper listactive
eDP-1 = <wallpaper1>
HDMI-A-1 = <wallpaper2>

$ hyprctl hyprpaper preload <wallpaper3>
ok
$ hyprctl hyprpaper listactive
... no change ...

$ hyprctl hyprpaper wallpaper ",<wallpaper3>"
ok
$ hyprctl hyprpaper listactive
 = <wallpaper3>
eDP-1 = <wallpaper1>
HDMI-A-1 = <wallpaper2>

$ hyprctl hyprpaper wallpaper "somewordhere,<wallpaper3>"
ok
$ hyprctl hyprpaper listactive
somewordhere = <wallpaper3>
 = <wallpaper3>
eDP-1 = <wallpaper1>
HDMI-A-1 = <wallpaper2>

Its definitely caused by assigning a wallpaper to a monitor that doesn't exist and it looks like its just adding it anyways instead of checking if its a real monitor before hand. I'll look into where.

justinesmithies commented 5 months ago

I'm still getting a ghost screen using hyprpaper for some reason and I'm using the latest version built from commit 09c4062659cfaf1bb5ba92532a17e1d131f3b3d2 . I only have two screens connected yet the output of this shows a third option but with no name before the = ???

╭─justine@justine-laptop ~ 
╰> hyprctl hyprpaper listactive
HDMI-A-1 = /home/justine/Pictures/Wallpapers/artur-sadlos-to-sh300-ooh-as-05i.jpg
eDP-1 = /home/justine/Pictures/Wallpapers/artur-sadlos-to-sh300-ooh-as-05i.jpg
 = /home/justine/Pictures/Wallpapers/artur-sadlos-to-sh300-ooh-as-05i.jpg
stephentoth commented 5 months ago

If you rollback to 79765e it should work as expected.

@vaxerski I think you (accidentally?) reverted this in 09c4062

(Edit: grammar and clarity)