OpenGL extension to the simple screen locker slock
Inspired by this reddit post this lock screen was implemented using the simplest lock program I could find. gllock will obscure the screen using an opengl texture shader.
In order to build gllock you need the following packages:
- x11proto-core-dev for
- libx11-dev for
- libglew-dev for
The other requirement will be fulfilled automatically when installing the above.
config.mk to match your local setup (gllock is installed into the
/usr/local namespace by default).
SHADER_LOCATION- location of the shader files (default
~/.gllock/which is a symlink to the shader folder of the repository)
FRGMNT_SHADER- the shader file to use (default circle.fragment.glsl)
The following command builds and installs gllock:
> sudo make clean install
Simply invoke the 'gllock' command. To get out of it, enter your password. However the typical setup involves using gllock with xautolock. For example in order to run gllock after N minutes of inactivity the following command may be used.
> sudo xautolock -time N -locker "gllock" &
when using a particular fragment shader you may want to figure out the supported glsl version for your system using
> glxinfo | grep 'version'
as explained here and then make the necessary modifications to the shader files.
Most opengl texture shaders from Shadertoy may be adapted to gllock with minimal modifications. You may use the following substitutions as a starting point.
uniform vec2 screenSizefor
uniform vec3 iResolution: viewport resolution pixels. (i.e.
uniform float timefor
uniform float iTime: shader playback time seconds. (i.e.
uniform sampler2D imageDatafor
uniform samplerXX iChannel0..3: input texture channel. (i.e.
void mainImage( out vec4 fragColor, in vec2 fragCoord )for the main function (i.e.
void mainImage(out vec4 fragColor, in vec2 fragCoord)->