i3lock-color/README.md

170 lines
9.7 KiB
Markdown
Raw Normal View History

2020-08-30 16:07:17 +00:00
# i3lock-color
2020-08-30 16:07:35 +00:00
2020-03-08 19:04:04 +00:00
![Language count](https://img.shields.io/github/languages/count/Raymo111/i3lock-color)
2021-02-15 06:42:31 +00:00
[![Top language](https://img.shields.io/github/languages/top/Raymo111/i3lock-color)](https://github.com/Raymo111/i3lock-color/search?l=c)
2020-03-08 19:04:04 +00:00
![Repo size](https://img.shields.io/github/repo-size/Raymo111/i3lock-color)
2021-02-15 06:42:31 +00:00
[![Open issues](https://img.shields.io/github/issues-raw/Raymo111/i3lock-color)](https://github.com/Raymo111/i3lock-color/issues?q=is%3Aopen+is%3Aissue)
[![Closed issues](https://img.shields.io/github/issues-closed-raw/Raymo111/i3lock-color?color=brightgreen)](https://github.com/Raymo111/i3lock-color/issues?q=is%3Aissue+is%3Aclosed)
[![Open PRs](https://img.shields.io/github/issues-pr-raw/Raymo111/i3lock-color?label=open%20PRs)](https://github.com/Raymo111/i3lock-color/pulls?q=is%3Aopen+is%3Apr)
[![Closed PRs](https://img.shields.io/github/issues-pr-closed-raw/Raymo111/i3lock-color?color=brightgreen&label=closed%20PRs)](https://github.com/Raymo111/i3lock-color/pulls?q=is%3Apr+is%3Aclosed)
[![Contributors](https://img.shields.io/github/contributors/Raymo111/i3lock-color)](https://github.com/Raymo111/i3lock-color/graphs/contributors)
[![Latest release](https://img.shields.io/github/release-date/Raymo111/i3lock-color?label=latest%20release)](https://github.com/Raymo111/i3lock-color/releases/latest)
2021-02-15 06:38:22 +00:00
[![Commits](https://img.shields.io/github/commits-since/Raymo111/i3lock-color/latest?include_prereleases&sort=semver)](https://github.com/Raymo111/i3lock-color/commits/master)
2020-03-08 19:04:04 +00:00
![Latest commit](https://img.shields.io/github/last-commit/Raymo111/i3lock-color)
2021-08-21 04:12:11 +00:00
[![AUR release ver](https://img.shields.io/aur/version/i3lock-color?label=AUR%20release%20ver&logo=ArchLinux)](https://aur.archlinux.org/packages/i3lock-color/)
[![AUR git ver](https://img.shields.io/aur/version/i3lock-color-git?label=AUR%20git%20ver&logo=ArchLinux)](https://aur.archlinux.org/packages/i3lock-color-git/)
![AUR votes](https://img.shields.io/aur/votes/i3lock-color-git?logo=ArchLinux)
[![GitHub forks](https://img.shields.io/github/forks/Raymo111/i3lock-color?logo=GitHub)](https://github.com/Raymo111/i3lock-color/network/members)
[![GitHub stars](https://img.shields.io/github/stars/Raymo111/i3lock-color?logo=GitHub)](https://github.com/Raymo111/i3lock-color/stargazers)
[![GitHub watchers](https://img.shields.io/github/watchers/Raymo111/i3lock-color?logo=GitHub)](https://github.com/Raymo111/i3lock-color/watchers)
[![Discord server](https://img.shields.io/discord/878461145197977630?label=Discord&logo=Discord)](https://discord.gg/FzVPghyDt2)
2022-01-20 22:19:08 +00:00
![Maintained](https://img.shields.io/maintenance/yes/9999)
2021-08-21 04:12:11 +00:00
<!--![Arch Linux package](https://img.shields.io/archlinux/v/community/x86_64/i3lock-color?logo=arch%20linux&label=Community%20version)-->
2020-03-08 19:04:04 +00:00
2020-10-29 03:58:50 +00:00
### The world's most popular non-default computer lockscreen.
2020-10-14 04:23:56 +00:00
**A modern version of i3lock with color functionality and other features.**
2020-03-08 19:04:04 +00:00
![i3lock-color in action](examples/screenshot.png "Screenshot sample")
2020-03-08 19:04:04 +00:00
2021-08-21 04:12:11 +00:00
**NEW: Official Discord server at https://discord.gg/FzVPghyDt2**
2020-03-08 19:04:04 +00:00
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.
2009-03-11 21:17:00 +00:00
2016-02-08 21:12:27 +00:00
Many little improvements have been made to i3lock over time:
2009-03-11 21:17:00 +00:00
- 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)
2020-03-16 02:05:28 +00:00
- 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`:
```bash
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
```
2016-02-08 21:12:27 +00:00
- You can specify whether i3lock should bell upon a wrong password.
2020-03-08 19:04:04 +00:00
- i3lock uses PAM and therefore is compatible with LDAP etc. On OpenBSD, i3lock uses the bsd\_auth(3) framework.
2009-03-11 21:17:00 +00:00
2020-03-08 19:04:04 +00:00
## Additional features in i3lock-color
You can also specify additional options, as detailed in the manpage. This includes, but is not limited to:
2020-03-08 19:04:04 +00:00
- Color options for:
2020-03-10 15:01:36 +00:00
- Verification ring
- Interior ring color
- Ring interior line color
- Key highlight color
- Backspace highlight color
- Text colors for most/all strings
2021-02-15 06:45:26 +00:00
- Outline colors
2020-03-10 15:01:36 +00:00
- Changing all of the above depending on PAM's authentication status
2020-03-09 12:52:28 +00:00
- 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
2021-02-15 06:45:26 +00:00
- Options for passwordless auth, removing modkey indicator
- Passing through media keys
2020-03-09 12:52:28 +00:00
- A new bar indicator, which replaces the ring indicator with its own set of options
2020-03-10 15:01:36 +00:00
- An experimental thread for driving the redraw ticks, so that things like the bar/clock still update when PAM is blocking
2021-02-15 06:45:26 +00:00
- Any other feature you want (add it yourself through a PR or make a feature request issue!)
2017-12-09 02:32:31 +00:00
2020-03-10 15:01:36 +00:00
## Dependencies
The following dependencies will need to be installed for a successful build, depending on your OS/distro.
2020-11-28 19:20:00 +00:00
### Arch Linux
2020-04-18 23:48:15 +00:00
- autoconf
2020-03-10 15:01:36 +00:00
- cairo
- fontconfig
2020-08-05 02:32:22 +00:00
- gcc
2020-03-10 15:01:36 +00:00
- libev
- libjpeg-turbo
- libxinerama
- libxkbcommon-x11
- libxrandr
- pam
- pkgconf
- xcb-util-image
- xcb-util-xrm
### Debian
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-util0-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev libjpeg-dev
```
2021-03-30 21:30:30 +00:00
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).
### Fedora
Run this command to install all dependencies:
```sh
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
```
### 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
```
2020-03-10 15:01:36 +00:00
## Building i3lock-color
2017-08-15 14:30:16 +00:00
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).
2021-01-09 02:24:50 +00:00
**If you want to build a non-debug version, you should tag your build before configuring.**
2017-08-15 14:30:16 +00:00
2021-01-09 02:24:50 +00:00
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.
2021-01-09 02:24:50 +00:00
i3lock-color uses GNU autotools for building.
To build/install i3lock-color, first install the dependencies listed above, then clone the repo:
2020-03-08 20:45:24 +00:00
```
git clone https://github.com/Raymo111/i3lock-color.git
cd i3lock-color
2020-05-10 19:13:17 +00:00
```
To build without installing, run:
```
./build.sh
2020-03-08 20:45:24 +00:00
```
2021-01-09 02:24:50 +00:00
To build AND install, run:
2020-05-10 19:13:17 +00:00
```
2020-05-10 19:17:14 +00:00
./install-i3lock-color.sh
2020-05-10 19:13:17 +00:00
```
2020-04-16 22:55:48 +00:00
You may choose to modify the script based on your needs/OS/distro.
2016-02-08 21:12:27 +00:00
2022-01-10 16:30:14 +00:00
## Alpine Linux Packages
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).
2020-03-08 19:05:27 +00:00
## Arch Linux Packages
2020-12-22 00:26:43 +00:00
~~[Stable version in Community](https://www.archlinux.org/packages/community/x86_64/i3lock-color/)~~
2022-01-10 16:30:14 +00:00
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:
2020-12-22 01:58:37 +00:00
- [Release Version on AUR](https://aur.archlinux.org/packages/i3lock-color/)
- [Git Version on AUR](https://aur.archlinux.org/packages/i3lock-color-git/)
2020-12-22 00:26:43 +00:00
2022-01-10 16:30:14 +00:00
If you're an Arch TU and you're reading this please consider sponsoring it into Community again!
## Gentoo Linux Package
2021-02-15 06:38:22 +00:00
i3lock-color is available on **GURU**, under [`x11-misc/i3lock-color`](https://github.com/gentoo/guru/tree/master/x11-misc/i3lock-color).
2022-01-10 16:30:14 +00:00
## Kali Linux Package
A Debian/Kali package is available: https://gitlab.com/kalilinux/packages/i3lock-color.
## NixOS Package
A NixOS package is available. To install, run
```
nix-env -iA nixos.i3lock-color
```
## Void Linux Package
A Void Linux package is available at https://github.com/void-linux/void-packages/tree/master/srcpkgs/i3lock-color.
2020-03-08 19:04:04 +00:00
## FreeBSD port
2022-01-10 16:30:14 +00:00
A FreeBSD port is available on freshports: [x11/i3lock-color/](https://www.freshports.org/x11/i3lock-color/).
2019-09-19 11:24:27 +00:00
2020-03-10 15:01:36 +00:00
## Running i3lock-color
2020-03-08 19:04:04 +00:00
Simply invoke the 'i3lock' command. To get out of it, enter your password and press enter.
2016-02-08 21:12:27 +00:00
2021-02-15 06:38:22 +00:00
A [sample script](examples/lock.sh) is included in this repository. [See the script in action](https://streamable.com/fpl46)
2020-03-08 19:04:04 +00:00
On OpenBSD the `i3lock` binary needs to be setgid `auth` to call the authentication helpers, e.g. `/usr/libexec/auth/login_passwd`.
2020-10-14 04:23:56 +00:00
## Contributors
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).
2020-03-08 19:04:04 +00:00
## Upstream
2021-02-15 06:38:22 +00:00
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).