slurp icon indicating copy to clipboard operation
slurp copied to clipboard

Implement option to use image as backgrop

Open tmccombs opened this issue 3 years ago • 2 comments

So that you can select a region of a full screenshot from grim (or similar).

I'm not sure if this will work with rotated or flipped displays yet.

tmccombs avatar Sep 04 '22 06:09 tmccombs

For those looking for a stopgap solution, I wrote a script that uses swayimg to display the background image. It's far from perfect, but it gets the job done.

#!/bin/sh

grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') /tmp/freeze-screenshot
swayimg -s fit -f /tmp/freeze-screenshot -b none &
grimshot --notify "$1" area
killall swayimg # We are only using swayimg for this purpose

raiguard avatar Aug 11 '23 18:08 raiguard

Cleaner version:

#!/bin/sh

set -euo pipefail
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - |
    swayimg -s fit -f -b none - &
swayimg_pid=$!
grimshot $@
kill $swayimg_pid

Invoke it with whatever args you'd normally pass to grimshot.

deifactor avatar Aug 14 '23 05:08 deifactor

Slight issue: The background image only shows after you click and drag. Otherwise, it shows the current defocused screen.

gptlang avatar Feb 26 '24 19:02 gptlang

Sorry, but I don't think this feature is desirable.

emersion avatar Feb 27 '24 09:02 emersion