Removing i3 lock sound

Annoying loud sound

I’m running i3wm installed with the default installer.

Every time I lock the screen with $mod+l there’s this extremely loud bip which is pretty annoying. I tried looking in the config file and I see it that it launch a perl script but I could not find anything about sound.

Anybody have the same problem or it is just me? I’ve no idea where to look to solve this.

Hi, by default on eos i3 Mod+L executes a custom script located at scripts/blur-lock.

~/.config/i3/config
# lock by blurring the screen:
bindsym $mod+l exec ~/.config/i3/scripts/blur-lock

These are the contents of the script:

#!/usr/bin/env bash

PICTURE=/tmp/i3lock.png
SCREENSHOT="scrot $PICTURE"

BLUR="5x4"

$SCREENSHOT
convert $PICTURE -blur $BLUR $PICTURE
i3lock -i $PICTURE
rm $PICTURE

You can stop the beep sound just by editing the file and adding a -z option after scrot:

SCREENSHOT="scrot -z $PICTURE"

From https://man.archlinux.org/man/community/scrot/scrot.1.en

-z, --silent
    Prevent beeping.
2 Likes

I have added a pr so that @joekamprad can take a look at it:

Adding the -z option before scrots prevents the beep sound after executing the script on locking the system with Mod+L.

Fixes:

1 Like
1 Like

Thank you very much, it would have taken eternity for me to figure that out!