naelstrof / maim

maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.
Other
2.15k stars 78 forks source link

[Feature Request] Flash region on screenshot #221

Open MithicSpirit opened 3 years ago

MithicSpirit commented 3 years ago

It would be nice if there was a switch that could be set which would make the screenshotted region flash when the screenshot was taken so that I have some feedback that it actually worked. This wouldn't work with just executing another program that flashes the screen after maim because it should flash the specific region that was screenshotted (rather than the entire screen).

foxpy commented 3 years ago

Combine slop and maim like this:

flash() {
    echo "Replace this function with actual flash program which would flash screen at $1"
}

coord="$(slop)"
save_path="$HOME/screenshot_$(date).png"
maim --geometry="$coord" > "$save_path"
flash "$coord"

Now someone should implement the flash program :)

foxpy commented 3 years ago

Yeah, slop is a part of maim, if you use maim, you almost definitely have slop installed.

alvv-z commented 1 year ago

In a script, you used to be able to call gnome's flash like this IIRC:

gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell/Screenshot -m org.gnome.Shell.Screenshot.FlashArea $ORIGX $ORIGY $WIDTH $HEIGHT

It no longer works since they've restricted the API access, but maybe someone with more knowledge could port their flash mechanic to maim.