Avatar
Hund

# emerge life

Use a pixelated version of your desktop as your lockscreen with i3lock

I decided it was time to spice up my lockscreen, I’ve been using the same old static picture for what feels like years now.

I’ve seen a lot of people use blurred and pixelated screenshots of their desktop and they do look pretty cool, so I decided to do the same thing myself. :)

My lockscreen using i3lock and a pixelated screenshot of my desktop

I wrote a Bash script that uses scrot and imagemagick to take a screenshot of my desktop, pixelate the image, add the lock icon to it and lastly lock the screen using the newly created image.

#!/bin/bash

icon="$HOME/.config/i3/lock.png"
img="$HOME/.cache/i3lock.png"

scrot $img
# Pixelate image
convert $img -scale 10% -scale 1000% $img
# Blur image
#convert $img -blur 0x4 500% $img
convert $img $icon -gravity center -composite $img
i3lock -u -i $img

The lock icon I use can be found on the website Iconfinder.com here and I used the 256px version myself.

I also included the option to blur the image, which does look cool as well, but that operation is noticeably slower than pixelating the image.

Feedback

I don't have a commenting system on my blog since there's no good solutions that works without JavaScript, is user friendly and respects both the users freedom and privacy. So for now, all feedback and hellos can be done via either e-mail, XMPP or Mastodon.