Personal copy of i3lock that displays a 12-hour clock and always shows unlock indicator.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
.github add CONTRIBUTING.md Jun 3, 2016
images Merged in changes from i3/i3lock upstream. Added new screenshots. Add… Nov 1, 2016
m4 Switch to autotools (#163) Dec 2, 2017
pam Bringing things up to speed with orignal i3lock, updated readme with … May 6, 2018
.clang-format commit missing .clang-format Mar 17, 2015
.gitignore Switch to autotools (#163) Dec 2, 2017
.travis.yml Switch to autotools (#163) Dec 2, 2017
CHANGELOG Update CHANGELOG and I3LOCK_VERSION Nov 25, 2017
I3LOCK_VERSION Update CHANGELOG and I3LOCK_VERSION Nov 25, 2017
LICENSE update debian packaging, update copyright Jul 13, 2011
Makefile.am Switch to autotools (#163) Dec 2, 2017
README.md Added missing instal step May 6, 2018
configure.ac make the check for libpam conditional (#165) Dec 11, 2017
cursors.h clang-format -i **/*.[ch] Mar 16, 2015
i3lock.1 Removed obsolete inactivity timeout (#84) Jul 20, 2016
i3lock.c Bringing things up to speed with orignal i3lock, updated readme with … May 6, 2018
i3lock.h clang-format -i **/*.[ch] Mar 16, 2015
randr.c Rename xinerama.[ch] to randr.[ch] Nov 18, 2017
randr.h Rename xinerama.[ch] to randr.[ch] Nov 18, 2017
unlock_indicator.c Bringing things up to speed with orignal i3lock, updated readme with … May 6, 2018
unlock_indicator.h Bringing things up to speed with orignal i3lock, updated readme with … May 6, 2018
xcb.c Fix memory leak when grabbing fails Mar 9, 2018
xcb.h SetInputFocus to the i3lock window to force-close context menus (#155) Oct 22, 2017

README.md

i3lock

This is my own copy of i3lock, consisting of the following tweaks:

  • Display changes on key-strokes and escape/backspace.
  • Added 12-hour clock to the unlock indicator and periodic updater so time stays relevant.
  • The unlock indicator will always be displayed, regardless of state. (Originally it was only shown after initial keypress)
  • Command line arguments to customize colors. Each (optional) argument will accept a color in hexadecimal format.
    • -o color Specifies verification color
    • -w color Specifies wrong password/backspace color
    • -l color Specifies default/idle color
    • The given colors will be used as-is for the lines and text for their respective states. The colors will automatically be lightened slightly and used with lower opacity (20%) for the circle fill.
    • If no colors are specified it defaults to green/red/black for verify/wrong/idle respectively.

Example Usage

i3lock -i ~/.i3/background.png -c '#000000' -o '#191d0f' -w '#572020' -l '#ffffff' -e

Screenshots

No configuration specified

Default

Error Color

Error

Example Configuration

Idle

Idle state

Key Press

On key press

Escape/Backspace

On escape or backspace

Background in above screenshots can be found in images/background.jpg

Install

Dependencies

Make sure you have the following libraries installed in addition to the packages in the requirements section below.

libxkbcommon-dev libxkbcommon-x11-dev libpam0g-devl

Build

Run the following commands:

git clone https://github.com/Lixxia/i3lock.git
cd i3lock
autoreconf -fi
mkdir -p build && cd build
../configure
make && sudo make install

Original README

i3lock - improved screen locker

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 a PNG image which will be displayed while your screen is locked.

  • 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.

Requirements

  • pkg-config
  • libxcb
  • libxcb-util
  • libpam-dev
  • libcairo-dev
  • libxcb-xinerama
  • libxcb-randr
  • libev
  • libx11-dev
  • libx11-xcb-dev
  • libxkbcommon >= 0.5.0
  • libxkbcommon-x11 >= 0.5.0

Running i3lock

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

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

Upstream

Please submit pull requests to https://github.com/i3/i3lock