i3lock-color/README.md

132 lines
6.0 KiB
Markdown
Raw Normal View History

2020-03-08 19:04:04 +00:00
# i3lock - improved screen locker
![Language count](https://img.shields.io/github/languages/count/Raymo111/i3lock-color)
![Top language](https://img.shields.io/github/languages/top/Raymo111/i3lock-color)
![Repo size](https://img.shields.io/github/repo-size/Raymo111/i3lock-color)
![Open issues](https://img.shields.io/github/issues-raw/Raymo111/i3lock-color)
![Closed issues](https://img.shields.io/github/issues-closed-raw/Raymo111/i3lock-color?color=brightgreen)
![Open PRs](https://img.shields.io/github/issues-pr-raw/Raymo111/i3lock-color?label=open%20PRs)
![Closed PRs](https://img.shields.io/github/issues-pr-closed-raw/Raymo111/i3lock-color?color=brightgreen&label=closed%20PRs)
![Contributor count](https://img.shields.io/github/contributors/Raymo111/i3lock-color)
2020-03-08 19:04:59 +00:00
![GitHub Release Date](https://img.shields.io/github/release-date/Raymo111/i3lock-color?label=latest%20release)
2020-03-08 19:04:04 +00:00
![Commits](https://img.shields.io/github/commits-since/Raymo111/i3lock-color/latest?include_prereleases&sort=semver)
![Latest commit](https://img.shields.io/github/last-commit/Raymo111/i3lock-color)
![Arch Linux package](https://img.shields.io/archlinux/v/community/x86_64/i3lock-color?logo=arch%20linux&label=Community%20version)
![AUR git ver](https://img.shields.io/aur/version/i3lock-color-git?label=AUR%20git%20ver)
![AUR votes](https://img.shields.io/aur/votes/i3lock-color-git)
2020-03-08 19:04:59 +00:00
![GitHub forks](https://img.shields.io/github/forks/Raymo111/i3lock-color)
![GitHub stars](https://img.shields.io/github/stars/Raymo111/i3lock-color)
![GitHub watchers](https://img.shields.io/github/watchers/Raymo111/i3lock-color)
2020-03-08 19:04:04 +00:00
![Maintenance](https://img.shields.io/maintenance/yes/2020)
**A re-patched version of i3lock with color functionality by [eBrnd](https://github.com/eBrnd/i3lock-color), started by [PandorasFox](https://github.com/PandorasFox/) (2015-2020), and now maintained by [Raymo111](https://github.com/Raymo111)**
![i3lock-color in action](screenshot.png "Screenshot sample")
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
2020-03-08 19:04:04 +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
2016-02-08 21:12:27 +00:00
after waking up your computer from suspend to RAM)
2020-03-08 19:04:04 +00:00
- You can specify either a background color or an image (JPG or PNG), which will be displayed while your screen is locked.
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:
- 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
2017-12-09 02:32:31 +00:00
2020-03-08 19:04:04 +00:00
## Building
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).
If there's no packaged version available - think carefully, since you're using a forked screen locker at your own risk.
2018-05-20 12:59:22 +00:00
**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.
2017-12-06 18:19:34 +00:00
i3lock now uses GNU autotools for building; you'll need to do something like `autoreconf -i && ./configure && make` to build.
2017-08-15 14:30:16 +00:00
2020-03-08 19:04:04 +00:00
### Required Packages
2016-02-08 21:12:27 +00:00
- pkg-config
- libxcb
- libxcb-util
- libpam-dev
- libcairo-dev
2017-12-09 02:32:31 +00:00
- libfontconfig-dev
- libxcb-composite0
- libxcb-composite0-dev
2016-02-08 21:12:27 +00:00
- libxcb-xinerama
- libxcb-randr
2016-02-08 21:12:27 +00:00
- libev
- libx11-xcb-dev
- libxkbcommon >= 0.5.0
- libxkbcommon-x11 >= 0.5.0
2017-12-08 05:09:20 +00:00
- libjpeg-turbo >= 1.4.90
2020-03-08 19:04:04 +00:00
2019-12-21 14:53:00 +00:00
#### Required Packages (Fedora 31)
- cairo-devel
- libev
- libev-devel
- libjpeg-devel
- libjpeg-turbo
- libxcb
- libxkbcommon
- libxkbcommon-x11
- libxkbcommon-x11-devel
- pam-devel
- pkg-config
- xcb-util-devel
- xcb-util-image
- xcb-util-image-devel
2019-12-21 14:53:00 +00:00
- xcb-util-xrm-devel
2016-02-08 21:12:27 +00:00
2020-03-08 19:04:04 +00:00
## Arch Package
[Stable version in Community](https://www.archlinux.org/packages/community/x86_64/i3lock-color/)
2017-12-06 18:19:34 +00:00
2020-03-08 19:04:04 +00:00
[Git Version on AUR](https://aur.archlinux.org/packages/i3lock-color-git/)
2020-03-08 19:04:04 +00:00
## FreeBSD port
2019-09-19 11:24:27 +00:00
[i3lock-color-port](https://github.com/rkashapov/i3lock-color-port/)
2020-03-08 19:04:04 +00:00
## Running i3lock
Simply invoke the 'i3lock' command. To get out of it, enter your password and press enter.
2016-02-08 21:12:27 +00:00
2020-03-08 19:04:04 +00:00
A [sample script](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-03-08 19:04:04 +00:00
## Building i3lock
First install the dependencies listed in requirements section, then run these commands (might need to be adapted to your OS):
2018-12-02 11:15:46 +00:00
```
autoreconf --force --install
rm -rf build/
mkdir -p build && cd build/
../configure \
--prefix=/usr \
--sysconfdir=/etc \
--disable-sanitizers
make
```
2020-03-08 19:04:04 +00:00
## 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.