|
@@ -1,22 +1,68 @@
|
1
|
|
-#slop-release-candidate
|
2
|
|
-
|
3
|
|
-Since I made slop when I was around 16, it is *really bad*.
|
4
|
|
-
|
5
|
|
-This just a re-write with less dependencies, inaccuracies, etc.
|
6
|
|
-
|
7
|
|
-TODO:
|
8
|
|
-- [x] Window Selection
|
9
|
|
-- [x] Keyboard
|
10
|
|
-- [x] Shaders
|
11
|
|
-- [x] Custom output formatting
|
12
|
|
-- [x] Manpages
|
13
|
|
-- [x] Option parsing
|
14
|
|
-- [x] Highlighting
|
15
|
|
-- [x] Mouse stuff
|
16
|
|
-- [x] Drawing stuff
|
17
|
|
-- [x] Printing stuff
|
18
|
|
-- [x] Librarify
|
19
|
|
-
|
20
|
|
-Avoiding:
|
21
|
|
-- [ ] Themes (Not going to happen. It'd add a texture library dependency.)
|
22
|
|
-- [ ] Magnification (Very expensive, probably not going to happen.)
|
|
1
|
+# slop
|
|
2
|
+slop (Select Operation) is an application that queries for a selection from the user and prints the region to stdout.
|
|
3
|
+
|
|
4
|
+## Features
|
|
5
|
+* Hovering over a window will cause a selection rectangle to appear over it.
|
|
6
|
+* Clicking on a window makes slop return the dimensions of the window, and it's ID.
|
|
7
|
+* OpenGL accelerated graphics where possible.
|
|
8
|
+* Supports simple arguments:
|
|
9
|
+ * Change selection rectangle border size.
|
|
10
|
+ * Select X display.
|
|
11
|
+ * Set padding size.
|
|
12
|
+ * Force window, or pixel selections with the tolerance flag.
|
|
13
|
+ * Set the color of the selection rectangles to match your theme! (Even supports transparency!)
|
|
14
|
+ * Remove window decorations from selections.
|
|
15
|
+* Supports custom programmable shaders.
|
|
16
|
+
|
|
17
|
+## Practical Applications
|
|
18
|
+slop can be used to create a video recording script in only two lines of code.
|
|
19
|
+```bash
|
|
20
|
+#!/bin/bash
|
|
21
|
+read -r X Y W H G ID < <(slop -f "%x %y %w %h %g %i")
|
|
22
|
+ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+$X,$Y -f alsa -i pulse ~/myfile.webm
|
|
23
|
+```
|
|
24
|
+
|
|
25
|
+You can also take images using imagemagick like so:
|
|
26
|
+```bash
|
|
27
|
+#!/bin/bash
|
|
28
|
+read -r G < <(slop -f "%g")
|
|
29
|
+import -window root -crop $G ~/myimage.png
|
|
30
|
+```
|
|
31
|
+If you don't like ImageMagick's import: Check out [maim](https://github.com/naelstrof/maim) for a better screenshot utility.
|
|
32
|
+
|
|
33
|
+## Lets see some action
|
|
34
|
+Ok. Here's a comparison between 'scrot -s's selection and slop's:
|
|
35
|
+
|
|
36
|
+![scrotbad](http://farmpolice.com/content/images/2014-10-14-12:08:24.png)
|
|
37
|
+![slopgood](http://farmpolice.com/content/images/2014-10-14-12:14:51.png)
|
|
38
|
+
|
|
39
|
+You can see scrot leaves garbage lines over the things you're trying to screenshot!
|
|
40
|
+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.
|
|
41
|
+
|
|
42
|
+## how to install
|
|
43
|
+
|
|
44
|
+### Install using your Package Manager (Preferred)
|
|
45
|
+
|
|
46
|
+* [Arch Linux: community/slop](https://www.archlinux.org/packages/community/x86_64/slop/)
|
|
47
|
+* [Void Linux: slop](https://github.com/voidlinux/void-packages/blob/24ac22af44018e2598047e5ef7fd3522efa79db5/srcpkgs/slop/template)
|
|
48
|
+* [FreeBSD: x11/slop](http://www.freshports.org/x11/slop/)
|
|
49
|
+* [OpenBSD: graphics/slop](http://openports.se/graphics/slop)
|
|
50
|
+* [CRUX: 6c37/slop](https://github.com/6c37/crux-ports/tree/3.2/slop)
|
|
51
|
+* [Gentoo: x11-misc/slop](https://packages.gentoo.org/packages/x11-misc/slop)
|
|
52
|
+* [GNU Guix: slop](https://www.gnu.org/software/guix/packages/#slop)
|
|
53
|
+* [Debian: slop](https://packages.debian.org/sid/slop)
|
|
54
|
+* Please make a package for slop on your favorite system, and make a pull request to add it to this list.
|
|
55
|
+
|
|
56
|
+### Install using CMake (Requires CMake)
|
|
57
|
+
|
|
58
|
+*Note: Dependencies should be installed first: libxext, OpenGL, and glm.*
|
|
59
|
+
|
|
60
|
+```bash
|
|
61
|
+git clone https://github.com/naelstrof/slop.git
|
|
62
|
+cd slop
|
|
63
|
+cmake -DCMAKE_INSTALL_PREFIX="/usr" ./
|
|
64
|
+make && sudo make install
|
|
65
|
+```
|
|
66
|
+
|
|
67
|
+### Shaders
|
|
68
|
+These are implemented, but not flushed out. I haven't gotten around to writing some tutorials on them. So check back later!
|