|
hace 11 años | |
---|---|---|
README.md | hace 11 años | |
license.txt | hace 11 años | |
main.cpp | hace 11 años | |
makefile | hace 11 años | |
options.cpp | hace 11 años | |
options.hpp | hace 11 años | |
x.cpp | hace 11 años | |
x.hpp | hace 11 años |
slrn (Select Region) is an application that querys for a selection from the user and prints the region to stdout. It grabs the mouse and turns it into a crosshair, lets the user click and drag to make a selection (or click on a window) while drawing a pretty box around it, then finally prints the selection's dimensions to stdout.
slrn can be used to create a video recording script in only two lines of code.
#!/bin/bash
eval `slrn`
ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+$X,$Y -f alsa -i pulse ~/myfile.webm
slrn lets you select a region or window and ffmpeg will record it in the format of your choice! Combined with keybinds and a server on your filesystem you can make a really neat and unobtrusive screenshooter.
You can also take images using imagemagick like so:
#!/bin/bash
eval `slrn`
import -window root -crop "$W"x"$H"+$X+$Y ~/myimage.png
Ok. Here's a comparison between 'scrot -s's selection and slrn's:
You can see scrot leaves garbage lines over the things you're trying to screenshot! While slrn not only looks nicer, it's impossible for it to end up in screenshots or recordings because it shuts down before ffmpeg or imagemagick can take a picture.