The world's most popular non-default computer lockscreen.
Go to file
Raymond Li 2bd34e03d4 Set theme jekyll-theme-midnight 2020-12-08 22:33:33 -05:00
.github Fix codeql 2020-10-14 00:18:53 -04:00
m4 Overhaul build, install and buildtest 2020-05-10 15:33:28 -04:00
pam Update i3lock 2020-08-04 17:35:54 -04:00
travis Merge everything from upstream except PR i3#280 2020-07-18 21:59:04 -04:00
.clang-format Merge everything from upstream except PR i3#280 2020-07-18 21:59:04 -04:00
.gitattributes Ensure LF EOL 2020-10-18 23:38:16 -04:00
.gitignore Fix PAM for Arch 2020-08-05 00:57:41 -04:00
.travis.yml Merge everything from upstream except PR i3#280 2020-07-18 21:59:04 -04:00
CHANGELOG Update CHANGELOG, I3LOCK_VERSION, configure.ac 2019-07-21 11:14:54 +02:00
I3LOCK_VERSION New version for new release 2020-07-22 15:07:07 -04:00
LICENSE Overhaul build, install and buildtest 2020-05-10 15:33:28 -04:00
Makefile.am Make generated binary clean so make distcheck works 2020-03-08 18:04:21 -04:00
README.md Add Fedora dependency list (#188) 2020-12-04 11:10:16 -05:00
SECURITY.md Create SECURITY.md 2020-10-15 12:35:56 -04:00
_config.yml Set theme jekyll-theme-midnight 2020-12-08 22:33:33 -05:00
blur.c fix compiling for 32-bit machines / machine without SSE2 2017-12-07 16:09:13 -05:00
blur.h fix compiling for 32-bit machines / machine without SSE2 2017-12-07 16:09:13 -05:00
blur_simd.c fix compiling on ARM 2017-12-08 22:26:20 -05:00
build.sh Move Arch check to configure.ac 2020-08-04 22:32:22 -04:00
configure.ac Fix PAM for Arch 2020-08-05 00:57:41 -04:00
cursors.h clang-format -i **/*.[ch] 2015-03-16 18:47:16 +01:00
dpi.c Respect Xft.dpi for determining the unlock indicator’s scale factor 2018-05-11 13:28:06 +02:00
dpi.h Respect Xft.dpi for determining the unlock indicator’s scale factor 2018-05-11 13:28:06 +02:00
fonts.h Quotes seem to be causing build issue 2020-03-08 16:17:05 -04:00
i3lock.1 Fix options -B and -S 2020-07-21 21:13:03 -04:00
i3lock.c Cleanup code and fix TODO error output 2020-10-19 12:34:57 -04:00
i3lock.h Merge everything from upstream except PR i3#280 2020-07-18 21:59:04 -04:00
install-i3lock-color.sh Fix install script 2020-10-09 14:12:27 -04:00
jpg.c fix NPE when no background image 2018-02-14 00:46:31 -05:00
jpg.h jpg.h: add include for sys/types.h and define _GNU_SOURCE. 2018-06-27 21:55:47 -03:00
lock.sh Change keylayout to 1 2020-10-19 00:33:10 -04:00
lock_bar.sh fix strncpy typo 2018-02-14 01:02:12 -05:00
randr.c Overhaul build, install and buildtest 2020-05-10 15:33:28 -04:00
randr.h Rename xinerama.[ch] to randr.[ch] 2017-11-18 10:51:35 +01:00
rgba.h Add drawing lock on multiple screens 2018-02-04 09:15:38 +01:00
screenshot.png Update screenshot.png 2020-03-10 10:28:18 -04:00
tinyexpr.c Made clock position freely modifiable 2017-05-19 15:52:29 +02:00
tinyexpr.h Made clock position freely modifiable 2017-05-19 15:52:29 +02:00
unlock_indicator.c Cleanup code and fix TODO error output 2020-10-19 12:34:57 -04:00
unlock_indicator.h Refactor to share image drawing code 2020-04-18 12:50:27 +02:00
xcb.c Fixed forgetting to free in xcb_get_key_group_index. 2020-06-02 12:05:50 -04:00
xcb.h Use 32bit-deep drawables to allow setting a color with alpha channel as background 2020-04-11 21:44:02 +02:00

README.md

i3lock-color

Language count Top language Repo size Open issues Closed issues Open PRs Closed PRs Contributor count GitHub Release Date Commits Latest commit Arch Linux package AUR git ver AUR votes GitHub forks GitHub stars GitHub watchers Maintenance

A modern version of i3lock with color functionality and other features.

i3lock-color in action

i3lock is a simple screen locker like slock. After starting it, you will see a white screen (you can configure the color/an image). You can return to your screen by entering your password.

Many little improvements have been made to i3lock over time:

  • i3lock forks, so you can combine it with an alias to suspend to RAM (run "i3lock && echo mem > /sys/power/state" to get a locked screen after waking up your computer from suspend to RAM)
  • You can specify either a background color or an image (JPG or PNG), which will be displayed while your screen is locked. Note that i3lock is not an image manipulation software. If you need to resize the image to fill the screen, you can use something like ImageMagick combined wih xdpyinfo:
    convert image.jpg -resize $(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/') RGB:- | i3lock --raw $(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'):rgb --image /dev/stdin
    
  • You can specify whether i3lock should bell upon a wrong password.
  • i3lock uses PAM and therefore is compatible with LDAP etc. On OpenBSD, i3lock uses the bsd_auth(3) framework.

Additional features in i3lock-color

You can also specify additional options, as detailed in the manpage. This includes, but is not limited to:

  • Color options for:
    • Verification ring
    • Interior ring color
    • Ring interior line color
    • Key highlight color
    • Backspace highlight color
    • Text colors for most/all strings
    • Changing all of the above depending on PAM's authentication status
  • Blurring the current screen and using that as the lock background
  • Showing a clock in the indicator
  • Refreshing on a timer, instead of on each keypress
  • Positioning the various UI elements
  • Changing the ring radius and thickness, as well as text size
  • Passthrough media keys
  • A new bar indicator, which replaces the ring indicator with its own set of options
    • An experimental thread for driving the redraw ticks, so that things like the bar/clock still update when PAM is blocking

Dependencies

The following dependencies will need to be installed for a successful build, depending on your OS/distro.

Ubuntu 18/20.04 LTS

Run this command to install all dependencies:

sudo apt install autoconf gcc make pkg-config libpam0g-dev libcairo2-dev libfontconfig1-dev libxcb-composite0-dev libev-dev libx11-xcb-dev libxcb-xkb-dev libxcb-xinerama0-dev libxcb-randr0-dev libxcb-image0-dev libxcb-util-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev libjpeg-dev

Debian

Replace libxcb-util-dev with libxcb-util0-dev in the Ubuntu installation command:

sudo apt install autoconf gcc make pkg-config libpam0g-dev libcairo2-dev libfontconfig1-dev libxcb-composite0-dev libev-dev libx11-xcb-dev libxcb-xkb-dev libxcb-xinerama0-dev libxcb-randr0-dev libxcb-image0-dev libxcb-util0-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev libjpeg-dev

Arch Linux

  • autoconf
  • cairo
  • fontconfig
  • gcc
  • libev
  • libjpeg-turbo
  • libxinerama
  • libxkbcommon-x11
  • libxrandr
  • pam
  • pkgconf
  • xcb-util-image
  • xcb-util-xrm

Fedora

Run this command to install all dependencies:

sudo dnf install -y autoconf automake cairo-devel fontconfig gcc libev-devel libjpeg-turbo-devel libXinerama libxkbcommon-devel libxkbcommon-x11-devel libXrandr pam-devel pkgconf xcb-util-image-devel xcb-util-xrm-devel

Building i3lock-color

Before you build - check and see if there's a packaged version available for your distro (there usually is, either in a community repo/PPA).

If there's no packaged version available - think carefully, since you're using a forked screen locker at your own risk.

If you want to build a non-debug version, you should tag your build before configuring. For example: git tag -f "git-$(git rev-parse --short HEAD)" will add a tag with the short commit ID, which will be used for the version info. Issues asking about ASAN/complaints about i3lock-color being slow / etc will likely be closed. i3lock-color uses GNU autotools for building.

To use i3lock-color, first install the dependencies listed above, then clone the repo:

git clone https://github.com/Raymo111/i3lock-color.git
cd i3lock-color

To build without installing, run:

chmod +x build.sh
./build.sh

To install after building, run:

chmod +x install-i3lock-color.sh
./install-i3lock-color.sh

You may choose to modify the script based on your needs/OS/distro.

Arch Linux Packages

Stable version in Community

Git Version on AUR

FreeBSD port

i3lock-color-port

Running i3lock-color

Simply invoke the 'i3lock' command. To get out of it, enter your password and press enter.

A sample script is included in this repository. See the script in action

On OpenBSD the i3lock binary needs to be setgid auth to call the authentication helpers, e.g. /usr/libexec/auth/login_passwd.

Contributors

This project was started by eBrnd, maintained for a few years by PandorasFox and now maintained and being developed by Raymo111. The full list of contributors can be found here.

Upstream

Please submit pull requests for i3lock things to https://github.com/i3/i3lock and pull requests for additional features on top of regular i3lock at https://github.com/Raymo111/i3lock-color.