prasanthrangan / hyprdots

// Aesthetic, dynamic and minimal dots for Arch hyprland
GNU General Public License v3.0
5.78k stars 698 forks source link

Wallpaper Resets after (mirrored) Monitor Change #642

Open Lightgaming opened 7 months ago

Lightgaming commented 7 months ago

Hey, I just installed Hyprdots and I have a slight problem when mirroring my Laptop Screen.

I set my monitor config to this monitor = ,highres,auto,1,mirror,HDMI-A-1

And now when I plug in another Monitor, it displays the default hyprland Wallpaper and not the swww wallpaper. When I use the SUPER+CTRL+W Wallpaper and select it again, it fixes it, but I don't want to do that everytime.

Any ideas what the problem could be?

prasanthrangan commented 7 months ago

Hey, have you configured both of your monitors in monitors.conf? also please check if each port is shown in swww cache ~/.cache/swww/

kRHYME7 commented 6 months ago

Hi @Lightgaming dunno yet on how to trigger swww for caching a monitor wallpaper but you can add this line

exec-once = Hyprdots run events this watches hyprland events, when events like plugging of monitor occurs it automatically loads again the wallpaper

this is the command used to reload the wallpaper swww img "$(awk -v home=$HOME -F'|' '$1 == 1 {gsub("~", home, $4); print $4}' "$HOME"/.config/hypr/theme.ctl)"

Lightgaming commented 6 months ago

Hey @prasanthrangan

Yes I have configured them in my monitors.conf and they are also in ~/.cache/swww/

image

@kRHYME7 exec-once = Hyprdots run events doesn't work for me. When I try to run the sww command you posted I get this error Error: "Socket file not found. Are you sure swww-daemon is running?"

So I guess swww is crashing when I connect/disconnect a monitor. Because when I do swww init the wallpaper is fixed again.

kRHYME7 commented 6 months ago

EDIT: I'm lazy and did not read the whole issue

*Tested: if swww crashes it won't display wallpaper to any monitor. I cannot reproduce the problem but I will try to fix the Hyprdots run events. This will rerun swww if monitor is plugged in.

Try this version v0.2.0.17.24011902 of Hyprdots-ctl (update it using the AUR) image

You can test the command by executing Hyprdots run events then try to plug and unplug your monitor.

Here's how to disable the default wallpaper (might conflict? )

? Disables the random Hyprland logo / anime girl background. Default is false.

disable_hyprland_logo = true

? Makes the background always have Hypr-chan, the Hyprland mascot. Default is false.

force_hypr_chan = false

======================================================================================

Some Modifications so that if a new monitor is plugged in the wallpaper will be the same. [Just a Feature]

(Did not read again the issue so yeah here is a solution to a non-existent problem)

I have a proposition, this will make all wallpaper identical for all saved monitors. Now if you change wallpapers it will also rewrite the other cached monitors.

How this is done : Edit ~/.config/hypr/scripts/swwwallpaper.sh

and at the bottom add this function

#? This is a quick script and Tittu might have a way to implement this better, for now, this will do.
# Get the changed file in the ~/.cache/swww/ directory
changed_file=$(ls -Art ~/.cache/swww/* | tail -n 1)
# Loop over each file in the ~/.cache/swww/ directory
for swwwFile in ~/.cache/swww/*; do
 # Copy the contents of the oldest file to the current file
 cp -f "${changed_file}" "${swwwFile}"
done
kRHYME7 commented 4 months ago

@Lightgaming Hello, can you confirm if changing monitors make swww crash? 🙏

xk67 commented 3 months ago

Yes, the problem still exists, currently in version 0.9.1. Visit https://github.com/LGFae/swww/issues/196