Skip to content

Releases: naelstrof/slop

v7.6

23 Apr 07:56
Compare
Choose a tag to compare
fixed missing images, version bump for previous merges

Slop now respects _NET_FRAME_EXTENTS

29 Jul 21:51
Compare
Choose a tag to compare

Slop now no longer selects shadows around windows in Mutter (the Gnome window manager). Gone is the annoying arbitrary padding around Gnome windows.

GLEW is back, Nvidia preload segfault is eliminated.

20 Jul 02:18
Compare
Choose a tag to compare

Turns out linking to pthreads fixed the issue of slop segfaulting during loading.
I re-added GLEW to dependencies because I realized including a custom OpenGL loader actually increases space taken, provided you use GLEW anyway.

Switched to a POSIX compliant argument parser.

24 May 02:06
Compare
Choose a tag to compare

This will break everyone's scripts who use shorthand like slop -b100, there should be a space between the -b and the 100 now.

Shader Support

27 Feb 21:22
Compare
Choose a tag to compare

In this release, users can now supply their own shaders to create neat effects.

Slop allows for chained post-processing shaders. Shaders are written in a language called GLSL, and have access to the following data from slop:

GLSL Name Data Type Bound to
mouse vec2 The mouse position on the screen.
desktop sampler2D An upside-down snapshot of the desktop, this doesn't update as the screen changes.
texture sampler2D The current pixel values of slop's frame buffer. Usually just contains the selection rectangle.
screenSize vec2 The dimensions of the screen, where the x value is the width.
position vec2 attribute This contains the vertex data for the rectangle. Only contains (0,0), (1,0), (1,1), and (0,1).
uv vec2 attribute Same as the position, this contians the UV information of each vertex.

The desktop texture is upside-down because flipping it would cost valuable time.

Shaders must be placed in your ${XDG_CONFIG_HOME}/slop directory, where XDG_CONFIG_HOME is typically ~/.config/. This folder won't exist unless you make it yourself.

Shaders are loaded from the --shader flag in slop. They are delimited by commas, and rendered in order from left to right. This way you can combine multiple shaders for interesting effects! For example, slop -rblur1,wiggle would load ~/.config/slop/blur1{.frag,.vert} and ~/.config/slop/wiggle{.frag,.vert}. Then render the selection rectangle twice, each time accumulating the changes from the different shaders.

Enough chatting about it though, here's some example shaders you can copy from shaderexamples to ~/.config/slop to try out!

The files listed to the right of the | are the required files for the command to the left to work correctly.

  • slop -rblur1,blur2 -b100 | ~/.config/slop/{blur1,blur2}{.frag,.vert}
    slop blur
  • slop -rwiggle -b10 | ~/.config/slop/wiggle{.frag,.vert}
    slop animation

And all together now...

  • slop -rblur1,blur2,wiggle -b50 -c1,1,1 | ~/.config/slop/{blur1,blur2,wiggle}{.frag,.vert}
    slop animation

Finally here's an example of a magnifying glass.

  • slop -rcrosshair | ~/.config/slop/crosshair{.frag,.vert}
    slop animation

It's fairly easy to adjust how the shaders work by editing them with your favourite text editor. Or even make your own!

Librarification, OpenGL requirement, wayland support, manpages.

23 Feb 20:47
Compare
Choose a tag to compare

Slop was remade to be cleaner, faster, and easier to use.

It's options parser was re-written so many flags/options now function differently, don't exist, or were renamed.

Now slop requires basic OpenGL stuff to compile, but will easily function without it. If it fails to launch an OpenGL context, it'll use the XShape extension instead.

OpenGL support! Shaders! Magnification! Texture themes!

11 Jul 23:58
Compare
Choose a tag to compare

OpenGL Support

After a lot of hard work, slop has been upgraded with OpenGL support. This means hardware accelerated rectangles that support shaders, magnifying glasses, and themes!

Shaders

Demo Shaders
Click for video
You can create, use, and edit shaders from simple configuration folders. They're pretty basic right now, but you can create some really neat effects. Slop ships with serveral defaults:

  • wiggle
  • refract
  • invert
  • cross
  • ripple
  • simple
  • hippie

Magnifying Glass

Demo MagGlass
Click for video
You can spawn a magnifying glass that gives you pixel perfect selections! Probably needs an option to disable keyboard and mouse grabbing so you can just spawn it whenever and keep it around.

Themes

Demo Themes
No video, sorry
Slop now can load and display textures, ships with a lame default "gothic". You can easily create more in your configuration folder at ~/.config/slop. See the README.md for more information.

Some new features.

04 Oct 00:40
Compare
Choose a tag to compare
  • Added opacity capabilities. --color now checks for an alpha value, but it's optional.
  • Added new option --highlight. Which instead of drawing a border around the selection, it draws over the selection. Best used with --color with an alpha set below 1.
  • Added option --minimumsize and --maximumsize, setting them both to the same value disables drag selections.
  • Slop windows now let all events fall through.
  • Incredibly improved rendering quality and speed, no longer do I re-size or move windows around. For some reason that's really expensive in X11...
  • Slop now outputs the ID of a selected window if any.
  • Minor bugfixes and adjustments.

ATTENTION PACKAGE MAINTAINERS: Please use the CMAKE_INSTALL_PREFIX to set the install location. The binary is now installed to CMAKE_INSTALL_PREFIX/bin/slop instead of the original CMAKE_INSTALL_PREFIX/slop.

Feature complete, should be stable on most configurations.

26 Sep 01:12
Compare
Choose a tag to compare
  • Windows are now properly selected via EnterNotify events instead of using XQueryPointer. This is mainly notable for the --nodecorations option I added.
  • Improved response time on rectangle drawing. Slop no longer creates a new rectangle every time the window selection changes, and it waits 0.01 seconds between moving/resizing rectangles for xorg to catch up and display the changes. This is a huge deal because now dragging a selection is super smooth.
  • Added a --nodecorations option that lets you select subwindows (Thanks to EnterNotify events). Thus usually removing decorations from screenshots, but its effectiveness varies between different applications and window managers.
  • --nokeyboard should be useless now. There's proper error handling, I've used a more formal way to "grab" the keyboard (So it should error less), and even if it fails to grab the keyboard you should still be able to cancel selections with keyboard presses albeit at the cost of having the key events fall through to other applications.
  • Slop now blocks until all windows are cleaned up by xorg properly. There's actually events and functions for this that I overlooked (DestroyNotify, XIfEvent, CWEventMask, StructureNotifyMask). Before I'd destroy the window then just sleep for x amount of time hoping xorg would decide to clean up the window in time, but that doesn't work at all due to xorg relying on a responsive program to actually remove the window for whatever reason. So now I really won't be lying when I say that slop's rectangles won't show up in screenshots or video recordings now! (I hope)
  • Slop prints two new variables on success now: "G" and "Cancel". G is set to the geometry of the selection (eg 1920x1080+0+0 ), Cancel is set to true or false depending on if the selection was canceled or failed in some way. These variables can make some scripts that use slop a whole lot cleaner and more reliable.
  • Several bugfixes like the selection being 1 pixel off, the cursor being the wrong image when there was no drag selection, and slop forgetting which window you selected before you started dragging has been fixed.
  • Thanks to Darkwater I added a --version option.