swaylock icon indicating copy to clipboard operation
swaylock copied to clipboard

display image across multiple screens

Open cycomanic opened this issue 6 years ago • 5 comments

i3lock would display an image across multiple screens. However swaylock does repeat the same image on all screens. It would be nice to have an option where swaylock displays a single image across both screens, I usually set one large image to stretch both screens.

cycomanic avatar Feb 04 '19 20:02 cycomanic

I am actually having the same issue. I'd also like to have one image to be displayed across multiple screens.

d4g avatar Mar 17 '19 10:03 d4g

While still in plain i3 I would scrot my current monitors, blur the image and then use it as a background in i3lock. If I was on multiple monitors then the blurred image will cover all of them.

scrot /tmp/screenshot.png
convert /tmp/screenshot.png -blur 0x5 /tmp/screenshot.png
# Superimpose Mr.Robot mask logo
composite -gravity center stop.png /tmp/screenshot.png  /tmp/screenshot.png
i3lock -f -i /tmp/screenshot.png && sleep 1

Exchanging scrot with grim and i3lock with swaylock should be ok, but alas swaylock cannot apply the image across the monitors.

stratosgear avatar Mar 18 '19 13:03 stratosgear

@stratosgear

but alas swaylock cannot apply the image across the monitors.

You can workaround this by enumerating all outputs (swaymsg -t get_outputs), taking a screenshot of each of them (grim -o $output ...) and then calling swaylock with a separate image for each output (swaylock --image=$output:$image ...).

Nonetheless, it would be nice if swaylock could display one image across all outputs (as now you need to run the convert for each image separately)

asmigala avatar Apr 19 '19 14:04 asmigala

@stratosgear I think you need something like this: https://gist.github.com/singulared/7c6d53c1b84fbb7cf22d07c5c7d3e945

singulared avatar Feb 12 '20 15:02 singulared

Yes that works great...

Buuut, I had to change the swaymsg -t get_outputs to something like:

swaymsg -t get_outputs | jq -r '.[] | select(.active == true) | .name'

because, when docked, I have the laptop screen deactivated and iterating over all outputs was causing an error.

But overall your script worked out fine, thanks.

Finally, I was able to achieve a faster blur with the corrupter

stratosgear avatar Feb 17 '20 13:02 stratosgear