Awesome Open Source
Awesome Open Source


Simple image glitcher suitable for producing nice looking i3lock backgrounds

Getting Started

$ git clone
$ cd corrupter && go build
$ ./corrupter -h
$ ./corrupter shots/example.png out.png && xdg-open out.png

If you're using an arch-based distro there are 2 AUR packages!

At the moment, you can only pass and output .png images. But that's enough to work well with scrot and i3lock.

Using with i3lock+scrot / swaylock+grim

As corrupter only glitches the image for a cool background, you'd have to set up a lock script.

Example screenshot lock script:

#!/usr/bin/env bash
scrot "$tmpbg"; corrupter "$tmpbg" "$tmpbg"
i3lock -i "$tmpbg"; rm "$tmpbg"

The script above takes a screenshot with scrot, distorts it with corrupter, and then locks the screen using i3lock.

If you're using i3, you can create the script at ~/.lock, and then add a lock bindsym.

bindsym $mod+Control+l exec --no-startup-id bash ./.lock

Using pre-corrupted images

Alternatively, you can pre-corrupt an image and always use it (which is faster):

$ ./corrupter shots/example.png ~/.wallpaper.png

and then, in your ~/.config/i3/config:

bindsym $mod+Control+l exec --no-startup-id i3lock -i ./.wallpaper.png

This method is slightly faster since the image processing is already done.

Less distorted image

Default config is pretty heavy-handed. To get less disrupted images you may want to reduce blur and distortion:

$ ./corrupter -mag 1 -boffset 2 shots/example.png out.png && xdg-open out.png


Images using the default parameters: demo1 demo2 demo3

With custom parameters:
Before: demo4

After (custom parameters and ImageMagick dim): demo5

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
go (13,642
golang (3,425
linux (2,138
image-processing (464
i3 (57
sway (23

Find Open Source By Browsing 7,000 Topics Across 59 Categories