Open MithicSpirit opened 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 :)
Yeah, slop
is a part of maim
, if you use maim
, you almost definitely have slop
installed.
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.
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).