Dalton Nell 3fa0eaeb15 Merge pull request #65 from nylen/add/gitignore | vor 7 Jahren | |
---|---|---|
modules | vor 7 Jahren | |
src | vor 7 Jahren | |
.gitignore | vor 7 Jahren | |
CMakeLists.txt | vor 7 Jahren | |
COPYING | vor 10 Jahren | |
README.md | vor 7 Jahren | |
license.txt | vor 10 Jahren | |
slop.1 | vor 7 Jahren | |
slop.1.gz | vor 7 Jahren |
slop (Select Operation) is an application that queries for a selection from the user and prints the region to stdout.
slop can be used to create a video recording script in only two lines of code.
#!/bin/bash
read -r X Y W H G ID < <(slop -f "%x %y %w %h %g %i")
ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+$X,$Y -f alsa -i pulse ~/myfile.webm
You can also take images using imagemagick like so:
#!/bin/bash
read -r G < <(slop -f "%g")
import -window root -crop $G ~/myimage.png
If you don't like ImageMagick's import: Check out maim for a better screenshot utility.
Ok. Here's a comparison between 'scrot -s's selection and slop's:
You can see scrot leaves garbage lines over the things you're trying to screenshot! While slop not only looks nicer, it's impossible for it to end up in screenshots or recordings because it waits for DestroyNotify events before completely shutting down. Only after the window is completely destroyed can anything take a screenshot.
Note: Dependencies should be installed first: libxext, OpenGL, and glm.
git clone https://github.com/naelstrof/slop.git
cd slop
cmake -DCMAKE_INSTALL_PREFIX="/usr" ./
make && sudo make install
These are implemented, but not flushed out. I haven't gotten around to writing some tutorials on them. So check back later!