i3lock-color(1)
okay so this is the i3lock-color(1) manual, and itβs literally the improved screen-locker bestie. π
β¨ NAME β¨
i3lock-color β improved screen locker. Thatβs the name, thatβs the vibe, no notes.
π SYNOPSIS π
i3lock-color [-v] [-n] [-b] [-i image.png] [-c color] [-t] [-p pointer]
[-u] [-e] [-f] [-m]
π DESCRIPTION π
i3lock-color is a simple screen locker like slock. After starting it, youβll see a white screen (and yes, bestie, you can configure the color or an image). You can return to your screen by entering your password. Periodt.
π¦ FEATURES π¦
i3lock-colorforks, so you can combine it with an alias to suspend to RAM. Runi3lock-color && echo mem > /sys/power/stateto get a locked screen after waking up your computer from suspend to RAM.- You can specify either a background color or a PNG image which will be displayed while your screen is locked.
- You can specify whether
i3lock-colorshould bell upon a wrong password. i3lock-coloruses PAM and therefore is compatible with LDAP, etc.
π OPTIONS π
-v,--versionβ Display the version of youri3lock-color.-n,--noforkβ Donβt fork after starting.-b,--beepβ Enable beeping. Be sure to not do this when you are about to annoy other people, like when opening your laptop in a boring lecture.-u,--no-unlock-indicatorβ Disable the unlock indicator.i3lock-colorwill by default show an unlock indicator after pressing keys. This will give feedback for every keypress and it will show you the current PAM state (whether your password is currently being verified or whether it is wrong).-ipath,--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 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-color --raw 3840x2160:rgb --image /dev/stdin
This allows you to load a variety of image formats without i3lock-color having to support each one explicitly. You can also use it to resize images to the screen ratio:
convert wallpaper.jpg -resize $(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/1/') RGB:- | i3lock-color --raw $(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/1/'):rgb --image /dev/stdin
Note that $(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/1/') gets you the current screen dimensions in the wxh (e.g. 1920x1080) format.
-crrggbbaa,--color=rrggbbaaβ Turn the screen into the given color instead of white. Color must be given in 4-byte format:rrggbbaa(i.e.ff0000ffis opaque red). Use the last byte for alpha. Setting this belowFF(i.e.ff000088) will allow your screen to be shown translucently if you use a compositor (e.g.compton,xcompmgr).-t,--tilingβ If an image is specified (via-i) it will display the image tiled all over the screen.
Note: For all image options, with a multi-monitor setup, the image is visible on all screens.
-C,--centeredβ If an image is specified (via-i) it will display the image centered on the screen.-F,--fillβ If an image is specified (via-i) it will scale the image until it fills the screen. A portion of the image will be cropped.-M,--maxβ If an image is specified (via-i) it will scale the image until either the width or the height fits the screen without being cropped. The border color can be set via-c.-L,--scaleβ If an image is specified (via-i) it will stretch the image until both the width and the height fits the screen.-pwin|default,--pointer=win|defaultβ If you specifydefault,i3lock-colordoes not hide your mouse pointer. If you specifywin,i3lock-colordisplays a hardcoded Windows-Pointer (thus enabling you to mess with your friends by using a screenshot of a Windows desktop as a locking-screen).-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.-f,--show-failed-attemptsβ Show the number of failed attempts, if any.--debugβ Enables debug logging. Note, that this will log the password used for authentication to stdout.
β οΈ bestie, --debug really does log the password used for authentication to stdout β thatβs the warning, not a drill.
okay bestie, we're deep in the option buffet now β grab a drink, this is the good part π
-Snumber,--screen=number β tells i3lock which display gets the unlock indicator and the clock. no option given means they show up on every screen. heads up: this number is zero indexed, and the ordering depends onlibxinerama(so like, it's vibes-based per setup, test it).-Bsigma,--blur=sigma β screenshot time β¨ it captures the screen and blurs it using sigma (that's the radius, bestie). images can still be overlaid over the blurred screenshot, so you're not locked out of stickers. alternatively: you can skip this whole option and instead give a translucent background color with the-coption β fully transparent or translucent β and let a compositor do the blurring for you (e.g.compton,picom). delegation, queen behaviour π-k,--clock,--force-clockβ displays the clock.--force-clockalso shows the clock when there's indicator text, which is super useful if your clock isn't positioned together with the indicator π°οΈ--indicatorβ forces the indicator to stay visible 24/7 instead of only popping up on activity. main character energy, always on camera π«--radiusβ the radius of the circle. defaults to90.--ring-widthβ how thick the ring unlock indicator is. defaults to7.0.--{inside, ring}-color=rrggbbaa β sets the *idle color for the interior circle and the ring. note: use the individual options per element *unless your shell supports brace expansion (in which case you remove the spaces inside the curly braces). no cap, read that twice π--{inside, ring}ver-color=rrggbbaa β interior circle and ring color **while the password is being verified. the "hold on bestie, checking" era.--{inside, ring}wrong-color=rrggbbaa β interior circle and ring color during those **incorrect password flashes. make it a dramatic red, you know you want to π- *
--line-color=rrggbbaa* β the color of the line separating the inside circle from the outer ring. the little boundary, the personal space π¦ --line-uses-{inside, ring}β overrides--line-color: the line just matches the{inside, ring}color instead. note: these two options conflict with each other, so pick one, don't be messy π- *
--{key, bs}hl-color=rrggbbaa* β the color of the highlight arcs on the ring when you press a key and when you hit backspace. instant feedback, we love to see it β¨οΈ - *
--separator-color=rrggbbaa* β the color of the "seperators" (their spelling, luv u) at both ends of those highlight arcs on the ring. --{verif, wrong, modif}-color=rrggbbaa β the color of the **status text while verifying, and when the password is wrong.- *
--{layout, time, date, greeter}-color=rrggbbaa* β sets text colors. yes, all of them. go feral π --keylayoutmode β displays the keylayout. it's positionable just like date, time, and the indicator. the modes go like this:0β displays the full string returned by the query, i.e."English (US)"1β displays up until the first parenthesis, i.e."English"2β displays just the contents of the parenthesis, i.e."US"
for all the following -str or -text options, some control characters (i.e. \n, \t) are supported. see CONTROL CHARACTERS for more details, iykyk.
--time-str="%H:%M:%S"β the format used to generate the time string. seestrftime(3)for a full list of format specifiers.--date-str="%A, %m %Y"β the format used to generate the date string.--verif-text="verifyingβ¦"β the string shown while verifying the password/input/key/etc.--wrong-text="wrong!"β the string shown when an incorrect password gets entered.--noinput-text="no input"β the string shown when you press backspace with literally nothing to delete π--lock-text="lockingβ¦"β the string shown while acquiring pointer and keyboard focus.--lockfailed-text="lock failed!"β the string shown after failing to acquire pointer and keyboard focus. the tragedy arc π--greeter-text=""β sets the greeter text.--no-modkey-textβ hides the modkey indicator (Num,Caps Lock...). bye clutter π--{time, date, layout, verif, wrong, modif, greeter}-alignβ sets the text alignment for the time, date, keylayout, verification, wrong, modifier and greeter texts. options:0β centered (default)1β left aligned2β right aligned
- *
--{time, date, layout, verif, wrong, greeter, modif}outline-color=rrggbbaa* β sets the color of the outlines. yes, the glow-up is customizable β¨ - *
--{time, date, layout, verif, wrong, greeter}-font=sans-serif* β sets the font used to render the various strings. - *
--{time, date, layout, verif, wrong, greeter}-size=number* β sets the font size used to render the various strings. - *
--{time, date, layout, verif, wrong, greeter, modifier}outline-width=number* β sets the width of the outline. --ind-pos="x-position:y-position"β where the unlock indicator sits. valid variables include:xβ x position of the current display. corresponds to the leftmost column of pixels on that display.yβ y position of the current display. corresponds to the topmost row of pixels on that display.wβ width of the current display.hβ height of the current display.rβ unlock indicator radius.
--time-pos="x-position:y-position"β where the time string sits. all the variables from--ind-poswork here, plus:ixβ x position of the indicator on the current display.iyβ y position of the indicator on the current display.- and if you're running the
--bar-indicatoroption, these are also on the menu:bwβ width of the bar indicator.bxβ x position of the bar indicator on the current display.byβ y position of the bar indicator on the current display.
--date-pos="x-position:y-position"β where the date string sits. everything from--ind-posand--time-posworks, plus:txβ x position of the timestring on the current display.tyβ y position of the timestring on the current display.
--greeter-pos="x-position:y-position"β where the greeter string sits. all the variables from--ind-posand--time-posare usable here.--pass-{media, screen, power, volume}-keysβ lets these keys behave normally even while the screen is locked, by passing them through:mediaβXF86AudioPlay,XF86AudioPause,XF86AudioStop,XF86AudioPrev,XF86AudioNext,XF86AudioMute,XF86AudioLowerVolume,XF86AudioRaiseVolume,XF86AudioMicMutescreenβXF86MonBrightnessUp,XF86MonBrightnessDownpowerβXF86PowerDown,XF86PowerOff,XF86SleepvolumeβXF86AudioMute,XF86AudioLowerVolume,XF86AudioRaiseVolume
--custom-key-commandsβ enables custom shell commands for the media, screen, power and volume keys. it's an alternative to--pass-mediakeys that'll work in any environment. glow-up unlocked π₯--cmd-**β a shell command to run when the corresponding key is pressed. requires--custom-key-commands. the mapping is:brightness-upβXF86MonBrightnessUpbrightness-downβXF86MonBrightnessDownmedia-playβXF86AudioPlaymedia-pauseβXF86AudioPausemedia-stopβXF86AudioStopmedia-nextβXF86AudioNextmedia-prevβXF86AudioPrevaudio-muteβXF86AudioMutevolume-upβXF86AudioRaiseVolumevolume-downβXF86AudioLowerVolumemic-muteβXF86AudioMicMutepower-downβXF86PowerDownpower-offβXF86PowerOffpower-sleepβXF86Sleep
π«Ά the bar indicator era (still OPTIONS, don't worry)
--bar-indicatorβ replaces the usual ring indicator with a bar indicator. and yeah, it comes with perks π--bar-direction={0, 1, 2}β sets which direction the bars grow in.0is the default (downwards, or rightwards, depending on the bar orientation).1is the reverse, and2is both.--bar-orientation={vertical,horizontal}β whether the bar is vertically or horizontally oriented. defaults tohorizontal.--bar-stepβ the step each bar decreases by when a key is pressed. one random bar gets set to its max height, then each neighbor is set to (height - step*distance).--bar-max-heightβ the maximum height a bar can reach. when a key is pressed, a random bar is set to this value, then its neighbors get its height minus the step value.--bar-base-widthβ the thickness of the "base" bar that all the bars originate from. this bar also takes on the ring verification and wrong colors, so you get your authentication feedback from it π«--bar-colorβ sets the default color of the bar base.--bar-periodic-stepβ how much the bars decrease by each time the screen is redrawn.--bar-posβ works similarly to the time/date/indicator expressions. if you give it only one number, that sets the vertical offset from the top or left edge. if you give it two numbers asx:y, it sets the starting position of the bar.--bar-countβ the number of minibars to draw on each screen.--bar-total-widthβ the total width of the bar. can be an expression.--redraw-threadβ starts a separate thread for redrawing the screen. potentially worse from a security standpoint, but it makes the bar indicator keep doing its usual periodic redraws while PAM is authenticating. tradeoffs, bestie βοΈ- *
--refresh-rate=seconds-as-double* β the refresh rate of the indicator, in seconds. this should automatically align itself, but it's somewhat buggy currently. values less than one will work, but may result in poor system performance. don't come for me, that's just what the page says π« --compositeβ some compositors have problems with i3lock-color trying to render over them, so this argument is disabled by default. however, some will work properly with it, so it's been left enabled. (yeah it says both, that's genuinely what it says π)--no-verifyβ does not verify the password entered by the user and unlocks immediately. use only for quickly testing new configurations, and remember to remove it to actually lock your screen! fr fr, do not ship this one π--slideshow-intervalβ the interval to wait until switching to the next image.--slideshow-random-selectionβ randomizes the order of the images. chaos, but make it aesthetic π¦
β¨ CONTROL CHARACTERS β¨
Okay so bestie, listen β control characters are fully supported in text OPTIONS and they work pretty much exactly like they do anywhere else. No weird lock-screen plot twist, no cap. π
Carriage Return (\r)
Moves you to the start of the line (the left edge). π
Heads up though: the characters that were already rendered still live there. So you're moving the cursor back, not hitting undo. It's giving "I'm standing somewhere new but the old vibes are still haunting the room" π
Line Feed (\n)
Moves you to the start of the next line (left edge). Fresh line, clean slate, main character energy. β¨
Backspace (\b)
Overwrites the last one char, if there is one. π«Ά
Same little caveat as \r though: the rendered character would still live there. Backspace moves you back, it does not delete the vibe. π
Tab (\t)
Moves to the next tab stop position. π
The width of one character for the purpose of moving is the same as the character 'a'.
Note: the width may be strange if the font is not mono-spaced. So like, if you picked a cute proportional font and your tabs are looking unhinged β that's why, bestie, it's not you. π
π SEE ALSO π
xautolock(1)β use i3lock-color as your screen saver πconvert(1)β feed a wide variety of image formats to i3lock-color πΌοΈ
π¦ HOMEPAGE π¦
https://github.com/Raymo111/i3lock-color
Please report bugs and submit pull-requests as follows β yes, there are two doors, pick the right one, iykyk:
- For i3lock-color (upstream):
https://github.com/i3/i3lock - For i3lock-color (enhancements on top of i3lock):
https://github.com/Raymo111/i3lock-color
π AUTHORS π
The icons who made this happen, fr fr:
- Michael Stapelberg
<michael+i3lock at stapelberg dot de> - Jan-Erik Rediger
<badboy at archlinux.us> - Pandora
<pandora at techfo dot xyz> - Raymond Li
<i3lock-color at raymond.li>
And that's the whole page, bestie β you ate that. π This little masterpiece lives on Linux, dated JAN 2022, and answers to the name i3lock-color(1). Go lock your screen in style. π
π¦ where this page comes from
- nixos 26.05: i3lock-color 2.13.c.5
- nixpkgs unstable: i3lock-color 2.13.c.5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms