I use a script to automate randomising my wallpapers over vertical and horizontal monitors.
#!/bin/bash
IFS=$'\n'
HorMonitors=($(hyprctl -j monitors all | jq -rc '.[] | select(.transform | . as $trans | [0, 2, 4, 6] | index($trans)) | .name'))
VerMonitors=($(hyprctl -j monitors all | jq -rc '.[] | select(.transform | . as $trans | [1, 3, 5, 7] | index($trans)) | .name'))
IFS=$' \t\n'
HorWallpapers=($(realpath /home/horsey/Pictures/Backgrounds/1/* | shuf -n 2))
VerWallpapers=($(realpath /home/horsey/Pictures/Backgrounds/5/* | shuf -n 1))
for i in "${!HorWallpapers[@]}"; do
hyprctl hyprpaper wallpaper "${HorMonitors[i]}","${HorWallpapers[i]}"
done
for i in "${!VerWallpapers[@]}"; do
hyprctl hyprpaper wallpaper "${VerMonitors[i]}","${VerWallpapers[i]}"
done
I used to have 3 monitors, 2 horizontal and 1 vertical, but I would switch one of the horizontal monitors back and forth between my personal computer and work, so my script queries hyprctl for active monitors and divides them based on transform values, then assigns a wallpaper with the correct orientation.
I've stopped using 2 horizontal monitors, but my script was still pulling 2 every time and running this command. In the past this was not an issue, but something in a recent update, I think 8.3.2 to 8.3.3 from the lionheart copr update, made this lazy code break hyprpaper.
Trying to run
for i in "${!HorWallpapers[@]}"; do
hyprctl hyprpaper wallpaper "${HorMonitors[i]}","${HorWallpapers[i]}"
done
With two wallpapers stored and only one monitor ques up the second horizontal wallpaper, which is then applied to my vertical monitor, and then I can't issue new wallpapers to the vertical monitor via hyprpaper, even if I refer to it by DP connection and a specific image file.
I fixed the problem with my script, and I think this is probably an upstream issue, but I'm not sure whether this is hyprtoolkit or one of the others. I'm posting this now so I don't forget/in case I don't figure it out, but if this needs to be closed and moved LMK
I use a script to automate randomising my wallpapers over vertical and horizontal monitors.
I used to have 3 monitors, 2 horizontal and 1 vertical, but I would switch one of the horizontal monitors back and forth between my personal computer and work, so my script queries hyprctl for active monitors and divides them based on transform values, then assigns a wallpaper with the correct orientation.
I've stopped using 2 horizontal monitors, but my script was still pulling 2 every time and running this command. In the past this was not an issue, but something in a recent update, I think 8.3.2 to 8.3.3 from the lionheart copr update, made this lazy code break hyprpaper.
Trying to run
With two wallpapers stored and only one monitor ques up the second horizontal wallpaper, which is then applied to my vertical monitor, and then I can't issue new wallpapers to the vertical monitor via hyprpaper, even if I refer to it by DP connection and a specific image file.
I fixed the problem with my script, and I think this is probably an upstream issue, but I'm not sure whether this is hyprtoolkit or one of the others. I'm posting this now so I don't forget/in case I don't figure it out, but if this needs to be closed and moved LMK