1 # i3lock-color 2 3  4 [](https://github.com/Raymo111/i3lock-color/search?l=c) 5  6 [](https://github.com/Raymo111/i3lock-color/issues?q=is%3Aopen+is%3Aissue) 7 [](https://github.com/Raymo111/i3lock-color/issues?q=is%3Aissue+is%3Aclosed) 8 [](https://github.com/Raymo111/i3lock-color/pulls?q=is%3Aopen+is%3Apr) 9 [](https://github.com/Raymo111/i3lock-color/pulls?q=is%3Apr+is%3Aclosed) 10 [](https://github.com/Raymo111/i3lock-color/graphs/contributors) 11 [](https://github.com/Raymo111/i3lock-color/releases/latest) 12 [](https://github.com/Raymo111/i3lock-color/commits/master) 13  14 [](https://aur.archlinux.org/packages/i3lock-color/) 15 [](https://aur.archlinux.org/packages/i3lock-color-git/) 16  17 [](https://github.com/Raymo111/i3lock-color/network/members) 18 [](https://github.com/Raymo111/i3lock-color/stargazers) 19 [](https://github.com/Raymo111/i3lock-color/watchers) 20 [](https://discord.gg/FzVPghyDt2) 21  22 <!----> 23 24 ### The world's most popular non-default computer lockscreen. 25 **A modern version of i3lock with color functionality and other features.** 26 27  28 29 **NEW: Official Discord server at https://discord.gg/FzVPghyDt2** 30 31 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. 32 33 Many little improvements have been made to i3lock over time: 34 35 - 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) 36 - 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`: 37 ```bash 38 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 39 ``` 40 - You can specify whether i3lock should bell upon a wrong password. 41 - i3lock uses PAM and therefore is compatible with LDAP etc. On OpenBSD, i3lock uses the bsd\_auth(3) framework. 42 43 ## Additional features in i3lock-color 44 You can also specify additional options, as detailed in the manpage. This includes, but is not limited to: 45 46 - Color options for: 47 - Verification ring 48 - Interior ring color 49 - Ring interior line color 50 - Key highlight color 51 - Backspace highlight color 52 - Text colors for most/all strings 53 - Outline colors 54 - Changing all of the above depending on PAM's authentication status 55 - Blurring the current screen and using that as the lock background 56 - Showing a clock in the indicator 57 - Refreshing on a timer, instead of on each keypress 58 - Positioning the various UI elements 59 - Changing the ring radius and thickness, as well as text size 60 - Options for passwordless auth, removing modkey indicator 61 - Passing through media keys 62 - A new bar indicator, which replaces the ring indicator with its own set of options 63 - An experimental thread for driving the redraw ticks, so that things like the bar/clock still update when PAM is blocking 64 - Any other feature you want (add it yourself through a PR or make a feature request issue!) 65 66 ## Dependencies 67 The following dependencies will need to be installed for a successful build, depending on your OS/distro. 68 69 ### Arch Linux 70 - autoconf 71 - cairo 72 - fontconfig 73 - gcc 74 - libev 75 - libjpeg-turbo 76 - libxinerama 77 - libxkbcommon-x11 78 - libxrandr 79 - pam 80 - pkgconf 81 - xcb-util-image 82 - xcb-util-xrm 83 84 ### Debian 85 Run this command to install all dependencies: 86 ``` 87 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 88 ``` 89 If you still see missing packages during build after installing all of these dependencies, try following the steps [here](https://github.com/Raymo111/i3lock-color/issues/211#issuecomment-809891727). 90 91 ### Fedora 92 Run this command to install all dependencies: 93 94 ```sh 95 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 96 ``` 97 98 ### Ubuntu 18/20.04 LTS 99 Run this command to install all dependencies: 100 ``` 101 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 102 ``` 103 104 ## Building i3lock-color 105 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). 106 107 **If you want to build a non-debug version, you should tag your build before configuring.** 108 109 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. 110 111 i3lock-color uses GNU autotools for building. 112 113 To build/install i3lock-color, first install the dependencies listed above, then clone the repo: 114 ``` 115 git clone https://github.com/Raymo111/i3lock-color.git 116 cd i3lock-color 117 ``` 118 To build without installing, run: 119 ``` 120 ./build.sh 121 ``` 122 To build AND install, run: 123 ``` 124 ./install-i3lock-color.sh 125 ``` 126 You may choose to modify the script based on your needs/OS/distro. 127 128 ## Alpine Linux Packages 129 Alpine packages i3lock-color for a variety of architectures. A full list can be found on [pkgs.alpinelinux.org](https://pkgs.alpinelinux.org/packages?name=i3lock-color&branch=edge). 130 131 ## Arch Linux Packages 132 ~~[Stable version in Community](https://www.archlinux.org/packages/community/x86_64/i3lock-color/)~~ 133 134 Unfortunately the previous maintainer left, and the package got dumped back into the AUR where I'm now maintaining it. You can get it on AUR: 135 - [Release Version on AUR](https://aur.archlinux.org/packages/i3lock-color/) 136 - [Git Version on AUR](https://aur.archlinux.org/packages/i3lock-color-git/) 137 138 If you're an Arch TU and you're reading this please consider sponsoring it into Community again! 139 140 ## Gentoo Linux Package 141 i3lock-color is available on **GURU**, under [`x11-misc/i3lock-color`](https://github.com/gentoo/guru/tree/master/x11-misc/i3lock-color). 142 143 ## Kali Linux Package 144 A Debian/Kali package is available: https://gitlab.com/kalilinux/packages/i3lock-color. 145 146 ## NixOS Package 147 A NixOS package is available. To install, run 148 ``` 149 nix-env -iA nixos.i3lock-color 150 ``` 151 152 ## Void Linux Package 153 A Void Linux package is available at https://github.com/void-linux/void-packages/tree/master/srcpkgs/i3lock-color. 154 155 ## FreeBSD port 156 A FreeBSD port is available on freshports: [x11/i3lock-color/](https://www.freshports.org/x11/i3lock-color/). 157 158 ## Running i3lock-color 159 Simply invoke the 'i3lock' command. To get out of it, enter your password and press enter. 160 161 A [sample script](examples/lock.sh) is included in this repository. [See the script in action](https://streamable.com/fpl46) 162 163 On OpenBSD the `i3lock` binary needs to be setgid `auth` to call the authentication helpers, e.g. `/usr/libexec/auth/login_passwd`. 164 165 ## Contributors 166 This project was started by [eBrnd](https://github.com/eBrnd/i3lock-color), maintained for a few years by [PandorasFox](https://github.com/PandorasFox) and now maintained and being developed by [Raymo111](https://github.com/Raymo111). The full list of contributors can be found [here](https://github.com/Raymo111/i3lock-color/graphs/contributors). 167 168 ## Upstream 169 Please submit pull requests for i3lock things to [https://github.com/i3/i3lock](https://github.com/i3/i3lock) and pull requests for additional features on top of regular i3lock at [https://github.com/Raymo111/i3lock-color](https://github.com/Raymo111/i3lock-color).
