GithubHelp home page GithubHelp logo

raymo111 / i3lock-color Goto Github PK

View Code? Open in Web Editor NEW

This project forked from i3/i3lock

1.0K 14.0 131.0 1.68 MB

The world's most popular non-default computer lockscreen.

License: Other

Makefile 0.60% C 70.09% Shell 1.18% Roff 5.25% M4 22.48% Dockerfile 0.40%
c i3lock autotools cairo i3 i3lock-color i3-wm lockscreen linux bsd

i3lock-color's Introduction

i3lock-color

Language count Top language Repo size Open issues Closed issues Open PRs Closed PRs Contributors Latest release Commits Latest commit AUR release ver AUR git ver AUR votes GitHub forks GitHub stars GitHub watchers Discord server Maintained

The world's most popular non-default computer lockscreen.

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

i3lock-color in action

NEW: Official Discord server at https://discord.gg/FzVPghyDt2

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
    • Outline colors
    • 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
  • Options for passwordless auth, removing modkey indicator
  • Passing through 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
  • Any other feature you want (add it yourself through a PR or make a feature request issue!)

Dependencies

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

Arch Linux

  • autoconf
  • cairo
  • fontconfig
  • gcc
  • 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

If you still see missing packages during build after installing all of these dependencies, try following the steps here.

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

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

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

i3lock-color uses GNU autotools for building.

To build/install 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:

./build.sh

To build AND install, run:

./install-i3lock-color.sh

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

Alpine Linux Packages

Alpine packages i3lock-color for a variety of architectures. A full list can be found on pkgs.alpinelinux.org.

Arch Linux Packages

Stable version in Community

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:

If you're an Arch TU and you're reading this please consider sponsoring it into Community again!

Gentoo Linux Package

i3lock-color is available on GURU, under x11-misc/i3lock-color.

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.

FreeBSD port

A FreeBSD port is available on freshports: x11/i3lock-color/.

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.

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.

i3lock-color's People

Contributors

airblader avatar atsutane avatar badboy avatar bendardenne avatar cmsxbc avatar danielotero avatar eplanet avatar evilbulgarian avatar eyenseo avatar gunslingerfry avatar happytetrahedron avatar highkite avatar jasperla avatar jezerm avatar jtpereyda avatar koebi avatar martin2250 avatar merovius avatar mortie avatar orestisfl avatar pandorasfox avatar rantingpirate avatar raymo111 avatar rio6 avatar rtfb avatar sandsmark avatar souravdas142 avatar stapelberg avatar stibi avatar vincentbernat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

i3lock-color's Issues

autotools is broken

upstream moved to use autotools in ef4f9e4. Not too bad, but:

  • blur stuff is broken (address sanitizer doesn't like it, at least
  • I haven't been able to get it to compile a non-address-sanitizing build yet
    • When I try to, it's apparently still inserting the address sanitization hooks, but jk lol no it's no

This'll require a lot of work :V

==8521==ERROR: LeakSanitizer: detected memory leaks

Expected behaviour

Fork and run as intended.

Actual behaviour

i3lock-color seems to run as expected, but it doesn't fork and produces the following error:

==8521==ERROR:` LeakSanitizer: detected memory leaks

Direct leak of 512 byte(s) in 2 object(s) allocated from:
    #0 0x7f2aa5c49ae9 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62
    #1 0x7f2aa20967ee  (/usr/lib/libfontconfig.so.1+0x1d7ee)

Indirect leak of 128 byte(s) in 4 object(s) allocated from:
    #0 0x7f2aa5c49ce1 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:70
    #1 0x7f2aa2096ed9  (/usr/lib/libfontconfig.so.1+0x1ded9)

Indirect leak of 20 byte(s) in 2 object(s) allocated from:
    #0 0x7f2aa5be03b1 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:560
    #1 0x7f2aa20961f5 in FcValueSave (/usr/lib/libfontconfig.so.1+0x1d1f5)

SUMMARY: AddressSanitizer: 660 byte(s) leaked in 8 allocation(s).

Steps to reproduce this behaviour

Just execute i3lock

System:

OS: Arch
i3lock-color version: 2.10.1c-non-git

Problem with empty string

The center circle would be gone if the Enter is pressed without pressing any other key (empty string as password).

adding text under the ring

i3lock permits to put some text like 'Type password to unlock" below the ring but I don't find the option here?

Thanks :)

Truncated time and date

For large font sizes and/or long format strings the time and date may get truncated. The reason for this seems to be #define CLOCK_WIDTH 400 in unlock_indicator.c which hardcodes the width of the text widget.

Screens flickering

A while back after updating my system (not only i3lock), my screens started flickering when running i3lock.
I tested this on my two Arch machines, a notebook and a desktop, tried the AUR package, compiled from source, exact same result. I was wondering if my something is wrong with Cairo or some driver, but original i3lock still runs fine and nothing else is acting the same way.

The machines are similiar software and driver-wise, but with completely different hardware.
What info do you need to help me solve this?

Rework discussion

Hello, I'm opening this issue to try to regroup discussion about the rework you want to do @PandorasFox.
If you don't want to open the discussion on this, feel free to close this issue.

I started to think about a flexible widget description structure, where we would be able to store the description (from the user) of a given widget (indicator, text, ... rectangle?). This is not intended for the runtime state of a given widget, only it's description.
Here is the current diff of my branch: c85ced6...bew:introduce-widget-description-in-arg-parser

What do you think?

What are your ideas about the rework and how to do it?

Input lag when using a background picture and blur at the same time

These are my current commandline arguments:
i3lock -k -S 0 --ringcolor=212121aa --timesize=90 --timefont="Google Sans Regular" --datefont="Google Sans Regular" --datesize=20 --timecolor=ffffffaa --datecolor=ffffffaa --linecolor=212121aa --insidecolor=212121aa -i ribbon.png --timepos="2037:115"

Ribbon.png is a black transparent ribbon across my monitors to add a darker background to the clock. This looks like this for reference. Issue is, when entering my password, some keystrokes are delayed by up to half a second, depending on how fast I type. When I type slowly there is no or minimal delay. This also stops happening when I either disable blur or remove the background image, but I would like to keep my setup as is.

Unrecognized option --textcolor

The script doesn't recognize the option --textcolor
here's the output when I use this option

i3lock-color: unrecognized option '--textcolor=ffffffff'
i3lock-color: Syntax: i3lock [-v] [-n] [-b] [-d] [-c color] [-u] [-p win|default] [-i image.png] [-t] [-e] [-f]
Please see the manpage for a full list of arguments.

to install it I simply cloned the repo and did :
autoreconf -i && ./configure && make

no errors occured and the examples scripts work well

Control the thickness of the ring

It seems there is no way to control the thickness of the unlock ring. I can control it radius by using --radius but not its thickness. I tried --bar-width and --bar-base-width but it seems that they are not relevant.

Support to set font for verification text

I couldn't find any option that lets one set the font for the verification text presently. Could you please consider adding one so that it can be consistent with the fonts for date and time?

clock disappears for a short time on wrong password

If you start i3lock with the following arguments:

i3lock --clock --timepos="x-90:h-ch+30"

so that the time is outside the circle and enter a wrong password, the time disappears as the circle outputs "wrong!" and reappears after the "wrong!" disappears again.

I hope that makes sense...

Wrong password

When i lock with i3lock-color, i get "Wrong password"
I've checked with i3lock --debug, and the password is entered correctly.

[i3lock-debug] scaling_factor is 1, physical diameter is 187 px
[i3lock-debug] redraw_screen(unlock_state = 1, auth_state = 0) @ [1515664402]
[i3lock-debug] scaling_factor is 1, physical diameter is 187 px
[i3lock-debug] redraw_screen(unlock_state = 0, auth_state = 1) @ [1515664402]
[i3lock-debug] scaling_factor is 1, physical diameter is 187 px
Authentication failure
[i3lock-debug] redraw_screen(unlock_state = 0, auth_state = 3) @ [1515664402]
[i3lock-debug] scaling_factor is 1, physical diameter is 187 px
[i3lock-debug] redraw_screen(unlock_state = 0, auth_state = 3) @ [1515664402]
[i3lock-debug] scaling_factor is 1, physical diameter is 187 px
[i3lock-debug] process_xkb_event for device 3
[i3lock-debug] process_xkb_event for device 3
[i3lock-debug] Read event of type 15
[i3lock-debug] process_xkb_event for device 3
[i3lock-debug] process_xkb_event for device 3
[i3lock-debug] clearing auth wrong
[i3lock-debug] redraw_screen(unlock_state = 0, auth_state = 0) @ [1515664404]
[i3lock-debug] scaling_factor is 1, physical diameter is 187 px

echo $USER gives me correct username.
Edit:
i3lock: version 2.10.1-1-c-1-g9cd1e44 (2018-01-06, branch "master") © 2010 Michael Stapelberg

Feature Request: Separate indicator color options for each indicator

F.e., indicator on monitor 0 could have --insidecolor=000000ff while the indicator on monitor 1 could have --insidecolor=ffffffff. I think this would be a worthwhile addition because it could be used by other applications to set the indicator colors based on e.g. the background lightness, which I'd like to do within my own i3lock-next.

Memory leak in release

Hi, so if I use the AUR package https://aur.archlinux.org/packages/i3lock-color/ which downloads and installs the latest release and execute the binary (i3lock) I get these errors:

=================================================================
==27506==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 768 byte(s) in 3 object(s) allocated from:
    #0 0x7fbe9cebcae9 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62
    #1 0x7fbe993df7ee  (/usr/lib/libfontconfig.so.1+0x1d7ee)

Indirect leak of 160 byte(s) in 5 object(s) allocated from:
    #0 0x7fbe9cebcce1 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:70
    #1 0x7fbe993dfed9  (/usr/lib/libfontconfig.so.1+0x1ded9)

Indirect leak of 20 byte(s) in 2 object(s) allocated from:
    #0 0x7fbe9ce533b1 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:560
    #1 0x7fbe993df1f5 in FcValueSave (/usr/lib/libfontconfig.so.1+0x1d1f5)

SUMMARY: AddressSanitizer: 948 byte(s) leaked in 10 allocation(s).

I don't know nearly enough about c to interpet these...

The weird thing is tho if I install the other AUR package https://aur.archlinux.org/packages/i3lock-color-git/ which downloads the current repository I get no such errors.

Please add an option to specify the circle radius

It would make a huge difference to me if there was a simple command line option to specify the radius of the circle. Currently this seems to be hardcoded in as #define BUTTON_RADIUS.

For my resolution, the default radius makes the unlock indicator look very tiny on my screen, which is not pleasing to the eye. Making it customisable would also give me more freedom to align the unlock indicator with a background image.

Command line options not recognized in 2.10

Forgive me if this is my mistake. I have compiled version 2.10-non-git. The binary does not seem to recognize options that diverge from the original i3lock. My launch command is:

i3lock -n -i $HOME/wallpaper.png \ --insidecolor=373445ff --ringcolor=ffffffff --line-uses-inside \ --keyhlcolor=d23c3dff --bshlcolor=d23c3dff --separatorcolor=00000000 \ --insidevercolor=fecf4dff --insidewrongcolor=d23c3dff \ --ringvercolor=ffffffff --ringwrongcolor=ffffffff --indpos="x+86:y+1003" \ --radius=15 --veriftext="" --wrongtext=""

The error message I get is:
i3lock: unrecognized option '--insidecolor=373445ff'. This goes on for all the other options if I delete the problematic one.

I thought maybe I was using the wrong, unforked binary. So I tried the same command(without the new --indpos option) with release 2.9.1-c(which says it is version 2.8-non-git when I ask i3lock -v), and that version worked. Therefore I had to conclude either I was missing a newly introduced launch procedure or there was a bug with the new release.

Would you be able to shed some light on this? Thank you so much for maintaining this repository!

Status text position

Any plans on integrating a --statuspos similar to those for the date string and clock? :)

Feature request: Keyboard Layout indicator

Title says it. I have 2 keyboard layouts, and I can't remember which one I had, so it usually takes 2 to 3 attempts to unlock my laptop.

Author of original i3 refuses to add such feature. There is fork that implements such feature, but it lacks i3lock-color customization.

veriftext centering

Hello, I tried using the following configuration:

--verif-font="FontAwesome"
--veriftext=""
--verif-size="100"

The character is an unlocked lock icon (U+F13E) from Font Awesome 4. While it's displayed properly, in the sense that it's using the proper font, the glyph is not centered in the middle of the ring.

Is this a vertical alignment bug? If not, is there a way to offset the verif text vertically please?
image

Rebase from upstream (2.8)

Hi,

i3lock 2.8 was released on Jun 4, 2016,
Can you rebase from upstream ?

Thank you, and good job for your work !

Memory Leak

I'm running Ubuntu 16.04 and when I run i3lock I see some memory leaks. This is what gets output:


=================================================================
==10018==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 512 byte(s) in 2 object(s) allocated from:
    #0 0x7fe050aa3602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x7fe04d2bf0b9  (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1d0b9)

Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7fe050aa379a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7fe04f1b9b92 in XkbAllocKeyboard (/usr/lib/x86_64-linux-gnu/libX11.so.6+0x9fb92)
    #2 0x40a52e in main ../../i3lock-color/i3lock.c:1301
    #3 0x7fe04e3f282f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Indirect leak of 496 byte(s) in 1 object(s) allocated from:
    #0 0x7fe050aa379a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7fe04f1a9586 in XkbGetNames (/usr/lib/x86_64-linux-gnu/libX11.so.6+0x8f586)

Indirect leak of 128 byte(s) in 4 object(s) allocated from:
    #0 0x7fe050aa379a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7fe04d2bf7c8  (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1d7c8)

Indirect leak of 11 byte(s) in 1 object(s) allocated from:
    #0 0x7fe050aa3602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x7fe04e45d489 in __strdup (/lib/x86_64-linux-gnu/libc.so.6+0x8b489)

SUMMARY: AddressSanitizer: 1219 byte(s) leaked in 9 allocation(s).

=================================================================
==10040==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 512 byte(s) in 2 object(s) allocated from:
    #0 0x7fe050aa3602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x7fe04d2bf0b9  (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1d0b9)

Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7fe050aa379a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7fe04f1b9b92 in XkbAllocKeyboard (/usr/lib/x86_64-linux-gnu/libX11.so.6+0x9fb92)
    #2 0x40a52e in main ../../i3lock-color/i3lock.c:1301
    #3 0x7fe04e3f282f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Indirect leak of 496 byte(s) in 1 object(s) allocated from:
    #0 0x7fe050aa379a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7fe04f1a9586 in XkbGetNames (/usr/lib/x86_64-linux-gnu/libX11.so.6+0x8f586)

Indirect leak of 128 byte(s) in 4 object(s) allocated from:
    #0 0x7fe050aa379a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7fe04d2bf7c8  (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1d7c8)

Indirect leak of 11 byte(s) in 1 object(s) allocated from:
    #0 0x7fe050aa3602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x7fe04e45d489 in __strdup (/lib/x86_64-linux-gnu/libc.so.6+0x8b489)

SUMMARY: AddressSanitizer: 1219 byte(s) leaked in 9 allocation(s).

=================================================================
==10041==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 512 byte(s) in 2 object(s) allocated from:
    #0 0x7fe050aa3602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x7fe04d2bf0b9  (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1d0b9)

Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7fe050aa379a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7fe04f1b9b92 in XkbAllocKeyboard (/usr/lib/x86_64-linux-gnu/libX11.so.6+0x9fb92)
    #2 0x40a52e in main ../../i3lock-color/i3lock.c:1301
    #3 0x7fe04e3f282f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Indirect leak of 496 byte(s) in 1 object(s) allocated from:
    #0 0x7fe050aa379a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7fe04f1a9586 in XkbGetNames (/usr/lib/x86_64-linux-gnu/libX11.so.6+0x8f586)

Indirect leak of 128 byte(s) in 4 object(s) allocated from:
    #0 0x7fe050aa379a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7fe04d2bf7c8  (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1d7c8)

Indirect leak of 11 byte(s) in 1 object(s) allocated from:
    #0 0x7fe050aa3602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x7fe04e45d489 in __strdup (/lib/x86_64-linux-gnu/libc.so.6+0x8b489)

SUMMARY: AddressSanitizer: 1219 byte(s) leaked in 9 allocation(s).

I'm not sure if anyone else gets this error.

Respect environment variable LC_TIME for Date and Time Formats

Hey,

First of all, thank you for i3lock-color!

I have a small issue regarding the formatting of date and time. I expect the options --timestr and --datestr to respect LC_TIME as in their description, it refers to strftime (See strftime(3) for a full list of format specifiers.). strftime respects LC_TIME as stated in its man page (The environment variables TZ and LC_TIME are used.).

In the code, LC_TIME seems to never be taken into account and strftime doesn't seem to be used. I am not so sure about this as my knowledge of C is pretty limited.

My setup is the following if it can help:

export LC_COLLATE=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LC_TIME=fr_CA.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
$ i3lock --version
i3lock: version 2.10.1-color-non-git © 2010 Michael Stapelberg

Error while loading shared libraries libasan.so

Hi! thanks for great i3lock improvement, I tried to install in Arch via AUR in stable version and installation is successfull but when I trying to run i3lock I got error something like this

i3lock: error while loading shared libraries: libasan.so.3: cannot open shared object file: No such file or directory

I think the way I installing it is right but I dont know why libasan.so suddenly dissolve, but when I try to install it via Git/Unstable version i3lock is works well but I got a blank screen (white), is this right? thanks!

todo: bar-style unlock indicator

criteria:

  • vertically or horizontally aligned
  • spans width/heigh
  • either highlight segments, or pulse it between two colors

Ideally:

  • has extra options, minibar_width and minibar_height, which will dictate the params for visualizer-style bars which will pop up at random on keypresses on one side of the bar (and then slowly go back down)
  • backspacing - remove bars, or have them change color or something?
  • keep a linked list of which ones were associated with which keystrokes?
  • aaa

Bug with date and time color

Currently running the latest version on Arch (did I mention I used Arch) from the AUR package. "--timecolor" sets the color for both the time and date and "--datecolor" doesn't do anything. Really appreciate this fork btw! Just the one issue I've noticed.

Unable to get i3lock-color up and running with i3lock-fancy-dual

Ok, I have i3lock-color installed along with i3lock-fancy-dual monitors. created a lock.sh file with the example script hit my short cut invoking i3lock like it says. I get the regular i3lock, not the colored one. I have the script, tried putting it to a shortcut and all I got were config errors. My i3lock config is bindsym $mod+shift+x exec i3lock. When I run the lock script by itself I get an error saying ./i3lock: no such file or directory. I am runing Arch linux. I put the lock script in my ~/.config/i3 folder.

Clock broken in multi monitor setups

Whatever was done in e64f9ad doesn't work well with multi monitor setups.

I have two external monitors connected to my notebook via a docking station, only one of which displays the clock in the right position.

The second monitor doesn't show the clock at all. The build-in notebook monitors shows the clock in the wrong position, apparently at the same coordinates as the primary monitor although the built-in monitor is much smaller.

Furthermore, the clock doesn't go away anymore when validating passwords which leads to texts being rendered on top of each other and therefore being unreadable.

Left aligned text (time/date)

Without having read any of the source, it seems as the text position (for both time and date) are calculated from a center point?
When manually left-aligning the time and date, this will ultimately cause the alignment to break as soon as the total length (in pixel) of either of them changes (new day, new month etc.)

(Somewhat) properly aligned

aligned

Alignment broken

unaligned

Command (stripped to the relevant stuff)

i3lock -n \
    --indicator \
    --clock \
    --indpos="60:1020" \
    --timepos="ix-130:iy-105" \
    --datepos="tx+82:ty+25" \
    --timestr="%H:%M" \
    --datestr="%A, %m %b %Y" \
    --timesize=20 \
    --datesize=20 \
    --radius=20 \
    --veriftext="" \
    --wrongtext=""```

Can't unlock on Gentoo

I've tried to install this by cloning the master branch AND by downloading the latest release zip. Build and installation don't give me any errors in either case. But when i start i3lock and enter my password, it tells me that it's wrong (I made very sure that it's not wrong 😉). I then have to kill it from a TTY session in order to access my desktop again.

I've uninstalled it and installed the official i3lock (v2.8) from the Gentoo repositories and the latest release (v2.10 downloaded as a tar.bz2 archive). Both work without issues, so there's gotta be a problem with your fork.

By the way, I'm using a German keyboard layout. However, I've already tried changing my password to something where the keyboard layout doesn't matter (pure number combination), without success.

Required packages for Ubuntu 16.04

Thanks to this post I got most of the list, but I had to flail around for a while to find the last couple even though I'd previously installed them on other systems. The last one or two required a PPA and I typically like to keep the number of PPAs I have installed to a minimum, but this one I think has a few good packages for

I was playing around with getting it to compile in a Docker container, and while I don't think I've narrowed down the list to only the bare minimum yet, installing ALL these packages at least allowed me to compile, and then installing them on my host let me sudo make install i3lock-color as i3lock.

FROM ubuntu:16.04

RUN apt-get update && \
    apt-get install -y \
      build-essential \
      git \
      software-properties-common && \
    add-apt-repository -y ppa:aguignard/ppa && \
    apt-get update && \
    apt-get install -y \
      autoconf \
      automake \
      checkinstall \
      libev-dev \
      libxcb-composite0 \
      libxcb-composite0-dev \
      libxcb-xinerama0 \
      libxcb-randr0 \
      libxcb-xinerama0-dev \
      libxcb-xkb-dev \
      libxcb-image0-dev \
      libxcb-util-dev \
      libxkbcommon-x11-dev \
      libjpeg-turbo8-dev \
      libpam0g-dev \
      pkg-config \
      xcb-proto \
      libxcb-xrm-dev \
      libxcb-randr0-dev \
      libxkbcommon-dev \
      libcairo2-dev \
      libxcb1-dev \
      libxcb-dpms0-dev \
      libxcb-image0-dev \
      libxcb-util0-dev \
      libev-dev \
      libxcb-xinerama0-dev \
      libxcb-xkb-dev \
    && rm -rf /var/lib/apt/lists/*

CMD autoreconf -i && ./configure && make

Clock stuff

Realized today that it'd be neat to have an option for the clock for specifying the redraw rate in seconds (maybe ms?) so that if, say, someone wants it to round to the nearest 5 seconds/minutes/whatever, they can have that happen.

Or something.

Really low priority, though.

Example screenshot would really "sell" it

I'm curious how the example colors you wrote down looks like. A screenshot example would be nice.

Note that it's not exactly clear how to install it (not without yaourt for example), so I'd need the extra motivation :-)

It seems very useful though.

make fail on linuxmint 18

Hi. Trying to install on linuxmint 18

 sudo aptitude install pkg-config libxcb1 libpam-dev libcairo-dev libxcb-xinerama0-dev libev-dev libx11-dev libx11-xcb-dev libxkbcommon0 libxkbcommon-x11-0 libxcb-dpms0-dev libxcb-image0-dev libxcb-util0-dev libxcb-xkb-dev libxkbcommon-x11-dev

Then I cloned and cd to the project.

$ make 
Package xkbcommon was not found in the pkg-config search path.
Perhaps you should add the directory containing `xkbcommon.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xkbcommon' found
Package xkbcommon was not found in the pkg-config search path.
Perhaps you should add the directory containing `xkbcommon.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xkbcommon', required by 'xkbcommon-x11', not found
cc -std=c99 -pipe -Wall  -D_GNU_SOURCE -DXKBCOMPOSE=0 -DVERSION=\""2.7-55-g87ba982 (2016-10-01)"\"  -c -o i3lock.o i3lock.c
i3lock.c:26:33: fatal error: xkbcommon/xkbcommon.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'i3lock.o' failed
make: *** [i3lock.o] Error 1

Some bugs / questions

Bug: If you set a big timesize or datesize, the text appears "cut", even if there is enough screen space.

Question: Having a bigger font, how do you center it across the indicator? It's almost impossible because of the combinations and the bug that i specified above :/

How to launch on Ubuntu

Hi
On the screenshots, this package looks amazing.
I already have i3lock working, and I wanted now to use Your extension.
I read documentation, installed required packages, but I don't know what's next. README doesn't cover how to run new, customized lock screen.
Then, I tried to download .git repository and run lock.sh script, but i got an error:

./lock.sh: 10: ./lock.sh: ./i3lock: not found

If You could help me launching this tool, It would allow someone (maybe even me) to submit PR with updated README

LeakSanitizer: detected memory leaks

Hello,

when I run i3lock with the following command I get some errors:

Command:

i3lock -n -e -f -i /tmp/i3lock-color_downscale.png --bar-indicator --bar-orientation=horizontal --bar-direction=1 --bar-position=1080 --bar-step=10 --bar-periodic-step=10 --bar-max-height=10 --bar-base-width=10 --bar-width=320 --bar-color=#00000000 --keyhlcolor=#64abbfff --bshlcolor=#d26937ff --ringvercolor=#edb443ff --ringwrongcolor=#c23127ff --clock --force-clock --timecolor=#99d1ceff --datecolor=#99d1ceff --timefont='Source Code Pro' --datefont='Source Code Pro' --timesize=80 --datesize=20 --datestr=%d/%m/%Y

Error:

=================================================================
==1014==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 768 byte(s) in 3 object(s) allocated from:
    #0 0x7f570a1acae9 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62
    #1 0x7f57066cf7ee  (/usr/lib/libfontconfig.so.1+0x1d7ee)

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f570a1433b1 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:560
    #1 0x55fab3e36636  (/usr/bin/i3lock+0x12636)
    #2 0x7f5707b77f49 in __libc_start_main (/usr/lib/libc.so.6+0x20f49)

Indirect leak of 160 byte(s) in 5 object(s) allocated from:
    #0 0x7f570a1acce1 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:70
    #1 0x7f57066cfed9  (/usr/lib/libfontconfig.so.1+0x1ded9)

Indirect leak of 22 byte(s) in 3 object(s) allocated from:
    #0 0x7f570a1433b1 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:560
    #1 0x7f57066cf1f5 in FcValueSave (/usr/lib/libfontconfig.so.1+0x1d1f5)

SUMMARY: AddressSanitizer: 982 byte(s) leaked in 12 allocation(s).

=================================================================
==1013==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1024 byte(s) in 4 object(s) allocated from:
    #0 0x7f570a1acae9 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62
    #1 0x7f57066cf7ee  (/usr/lib/libfontconfig.so.1+0x1d7ee)

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f570a1433b1 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:560
    #1 0x55fab3e36636  (/usr/bin/i3lock+0x12636)
    #2 0x7f5707b77f49 in __libc_start_main (/usr/lib/libc.so.6+0x20f49)

Indirect leak of 256 byte(s) in 8 object(s) allocated from:
    #0 0x7f570a1acce1 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:70
    #1 0x7f57066cfed9  (/usr/lib/libfontconfig.so.1+0x1ded9)

Indirect leak of 33 byte(s) in 4 object(s) allocated from:
    #0 0x7f570a1433b1 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:560
    #1 0x7f57066cf1f5 in FcValueSave (/usr/lib/libfontconfig.so.1+0x1d1f5)

SUMMARY: AddressSanitizer: 1345 byte(s) leaked in 17 allocation(s).

My script:

#!/bin/bash

lock=/tmp/i3lock.lock
echo $$ >> $lock
first=$(head -n 1 $lock)
if [[ $first != $$ ]]; then
    echo "Locked by $first: $lock"
    exit 1
fi

scale=$1
if [[ $scale == "" ]]; then
	scale=10
fi

downscale=$((100 / scale))
upscale=$((100 * scale))
image_1=/tmp/i3lock-color_downscale.bmp
image_2=/tmp/i3lock-color_downscale.png

scrot $image_1 -q 50
#time convert $image_1 -scale $downscale% -scale $upscale% $image_2
pixelate -i $image_1 -o $image_2 -f $scale

options="-n -e -f -i $image_2"
options+=" --bar-indicator"
options+=" --bar-orientation=horizontal"
options+=" --bar-direction=1"
options+=" --bar-position=1080"
options+=" --bar-step=$scale"
options+=" --bar-periodic-step=$scale"
options+=" --bar-max-height=$scale"
options+=" --bar-base-width=$scale"
options+=" --bar-width=$((scale * 32))"
options+=" --bar-color=#00000000"
options+=" --keyhlcolor=#64abbfff"
options+=" --bshlcolor=#d26937ff"
options+=" --ringvercolor=#edb443ff"
options+=" --ringwrongcolor=#c23127ff"
options+=" --clock"
options+=" --force-clock"
options+=" --timecolor=#99d1ceff"
options+=" --datecolor=#99d1ceff"
options+=" --timefont='Source Code Pro'"
options+=" --datefont='Source Code Pro'"
options+=" --timesize=80"
options+=" --datesize=20"
options+=" --datestr=%d/%m/%Y"
#options+=" --redraw-thread"

autosuspend -c ~/.config/autosuspend/i3lock-color.conf &
as_pid=$!
i3lock $options
kill $as_pid
rm $image_1 $image_2 $lock

This does not prevent i3lock from working, but it seems like it does need to be addressed.

How to specify custom font?

How do I specify custom font used for clock or date?
I see there is an option --timefont, but I don't know what should I specify.
Let's say I have a font called DejaVu Sans. Specifying this name doesn't change anything. I've also tried DejaVu-Sans.
What am I doing wrong?

Add blur support

Notes for myself:

  • do something similar to this
  • maybe incrementally blur so it gradually blurs into the lockscreen
  • (also maybe allow any keystroke in that period to cause it to exit?)
  • potentially let i3lock also capture the screen and blur that
  • allow blurring of an image passed in is a must (needs to hold it in ram, though)
    need to play around and see how it handles large blur operations and what it displays in the meantime (i.e. if nothing displays, or if it shows the "locking..." thing)

new tarball release

There have been some commits since the last release in early 2015.
Could you make a new release, so that I can finish my package for Guix without the git dependency?

That would be most appreciated.

Indicator position bug

i3lock --indicator looks like this:
screenshot from 2018-01-25 20-00-28

i3lock --indicator --indpos="w:h":
screenshot from 2018-01-25 20-00-16

i3lock --indicator --indpos="0:0":
screenshot from 2018-01-25 20-04-05

My resolution is 1920x1080 and i don't have any problems with regular version of i3lock (correctly centered).

README / manpage / help output

The last few commits introduced new command line arguments which appear to be (partially?) missing from the docs, such as --indicator and -B blur_strength.

In general, the documentation appears to be somewhat inconsistent with some arguments only mentioned when executing i3lock -h while others can only be found in README.md.

The man page appears to be merely a copy from upstream i3lock even though it says i3lock-color in the title.

This is mildly confusing to new users.

I might be better for everyone – maintainers and users alike – to just scrap the custom man page and help output in favor of just adding an extra line giving the URL of README.md on GitHub.

This could reduce maintenance effort and may be better than the current very long and cryptic output produced by i3lock -h.

Any opinions on that?

Compiling on ARM doesn't work

Probably due to SSE stuff. I should get the makefile or something to work around that, or provide a makefile recipe that works fine for ARM.

Text colour doesn't change

Since a recent update, the text colour option --textcolor doesn't seem to be working.
I am always getting the text in black no matter what argument I pass.

datestr doesn't recognize locale

Im running the latest version from the AUR (i3lock-color-git r358.206405e-1) with a german locale (LANG=de_DE.UTF-8 set, locale gives me the correct output, etc).

--datestr="%x" results in "08/02/2017" on the lock screen where it should be "02.08.2017".

Feature request: Add shadow around the text for readability

Hello,

I use the --blur option to screenshot & blur the screen, and I'm having a hard (impossible?) time to choose the color of the text (clock & date), because the blurry background can sometime be of the same or close to the color of the text, making the text unreadable.

Adding a light shadow under/around the text would fix this issue, by making the text kind-of above the background.

Another way (simpler to implement I think) would be to allow to tint the whole generated background with a color. For example 00000033 for this color would make the whole background a little bit darker, so the text (assuming it's white) is properly readable.

What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.