i3lock(1)
β¨ i3lock β improved screen locker β¨
okay so bestie, welcome to the i3lock(1) manual page, from the User Manuals section. this is the screen locker that ate π
it locks your screen, it looks however you want, and it uses PAM so it plays nice with LDAP and friends. let's get into it.
πΈ SYNOPSIS πΈ
i3lock [-v] [-n] [-b] [-i image.png] [-c color] [-t] [-p pointer] [-u]
[-e] [-f]
π RECOMMENDED USAGE π
xss-lock --transfer-sleep-lock -- i3lock --nofork
fr fr, this is the way. using xss-lock means your screen gets locked before your laptop suspends. that's the whole point.
not me using a systemd service file π because that is not adequate β a systemd service file will not delay suspend until your screen is locked. so don't do that. periodt.
π¦ DESCRIPTION π¦
i3lock is a simple screen locker, kinda like slock. you start it up and you get a white screen (or, like, whatever color/image you configured, you icon). you get back to your screen by entering your password. that's it. that's the vibe.
π IMPROVEMENTS π
i3lockforks, so you can pair it with an alias to suspend to RAM β runi3lock && echo mem > /sys/power/stateand you'll get a locked screen after your computer wakes up from suspend to RAM. slay- you can specify either a background color or a PNG image, and it'll be displayed while your screen is locked.
- you can specify whether
i3lockshould bell upon a wrong password. π i3lockuses PAM, which means it's compatible with LDAP, etc. cross-compatible queen
π OPTIONS π
-v,--versionβ display the version of youri3lock. π-n,--noforkβ don't fork after starting.-b,--beepβ enable beeping. but be sure to not do this when you're about to annoy other people, like when opening your laptop in a boring lecture. π please bestie, i'm begging.-u,--no-unlock-indicatorβ disable the unlock indicator. by defaulti3lockshows an unlock indicator after pressing keys, which gives feedback for every keypress and shows you the current PAM state (whether your password is currently being verified or whether it is wrong). lowkey useful, highkey your call.- *
-i*path,--image=path β display the given PNG image instead of a blank screen. πΌοΈ - *
--raw=format* β read the image given by--imageas a raw image instead of PNG. the argument is the image's format, written as<width>x<height>:<pixfmt>. the supported pixel formats are:native,rgb,xrgb,rgbx,bgr,xbgr, andbgrx. thenativepixel format expects a pixel as a 32-bit (4-byte) integer in the machine's native endianness, with the upper 8 bits unused; red, green and blue are stored in the remaining bits, in that order.
example:
--raw=1920x1080:rgb
you can use ImageMagick's convert(1) program to feed raw images into i3lock:
convert wallpaper.jpg RGB:- | i3lock --raw 3840x2160:rgb --image /dev/stdin
this lets you load a variety of image formats without i3lock having to support each one explicitly. big brain energy π§ β¨
- *
-c*rrggbb,--color=rrggbb β turn the screen into the given color instead of white. color must be given in 3-byte format:rrggbb(i.e.ff0000is red). π -t,--tilingβ if an image is specified (via-i) it will display the image tiled all over the screen. and if it's a multi-monitor setup, the image is visible on all screens. π₯οΈπ₯οΈ- *
-p*win|default,--pointer=win|default β if you specifydefault,i3lockdoes not hide your mouse pointer. if you specifywin,i3lockdisplays a hardcoded Windows-Pointer (thus enabling you to mess with your friends by using a screenshot of a Windows desktop as a locking-screen). π iconic prank behavior, no cap. -e,--ignore-empty-passwordβ when an empty password is provided by the user, do not validate it. without this option, the empty password will be provided to PAM and, if invalid, the user will have to wait a few seconds before another try. this can be useful if theXF86ScreenSaverkey is used to put a laptop to sleep and bounce on resume, or if you happen to wake up your computer with the enter key. the way that enter key betrays you π-f,--show-failed-attemptsβ show the number of failed attempts, if any. tracking the L's, respectfully-k,--show-keyboard-layoutβ show the current keyboard layout. β¨οΈ--debugβ enables debug logging.
β οΈ NOTE, BESTIE β οΈ --debug will log the password used for authentication to stdout. the password. to stdout. be so careful with that. π«Ά
π DPMS π
the -d (--dpms) option was removed from i3lock in version 2.8. there were plenty of use-cases that were not properly addressed, and plenty of bugs surrounding that feature. while features are not normally removed from i3 and its tools, we felt the need to make an exception in this case.
users who wish to explicitly enable DPMS only when their screen is locked can use a wrapper script around i3lock like the following:
#!/bin/sh
revert() {
xset dpms 0 0 0
}
trap revert HUP INT TERM
xset +dpms dpms 5 5 5
i3lock -n
revert
the -I (--inactivity-timeout=seconds) was also removed, because it only makes sense with DPMS. gone but not forgotten ποΈ
π SEE ALSO π
xss-lock(1)β hooks upi3lockto the systemd login managerconvert(1)β feed a wide variety of image formats toi3lock
β AUTHOR β
Michael Stapelberg <michael+i3lock at stapelberg dot de>
and that's the whole page, bestie!! this one came from the Linux manual set, dated JANUARY 2012, and it's i3lock(1) all the way through. go lock that screen. ππ
π¦ where this page comes from
- alpine 3.24: i3lock-doc 2.16-r0 Β· MIT
- arch rolling: i3lock 2.16-1 Β· MIT
- debian trixie: i3lock 2.15-2 Β· BSD-3-Clause
- fedora 43: i3lock 2.16-1.fc43 Β· MIT
- fedora 44: i3lock 2.16-2.fc44 Β· MIT
- nixpkgs unstable: i3lock 2.16
- ubuntu questing: i3lock 2.15-2
- ubuntu resolute: i3lock 2.16-1 Β· BSD-3-Clause
- ubuntu stonking: i3lock 2.16-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms