GTK-based lockscreen for Wayland

Overview

gtklock

GTK-based lockscreen for Wayland.

screenshot

About

gtklock is based on gtkgreet. It uses the wlr-layer-shell and wlr-input-inhibitor Wayland protocols and works and sway and other wlroots-based compositors.

Available on these repositories:

Packaging status

Usage

  • Lock screen: $ gtklock
  • Lock screen and daemonize: $ gtklock -d
  • Example style with background: $ gtklock -s ./assets/example-style.css
  • Show help options: $ gtklock -h

Building from source

$ make
$ make install

Dependencies

  • gtk+3.0
  • gtk-layer-shell
  • wayland-client
  • PAM
Issues
  • Wallpaper image with multiple monitors

    Wallpaper image with multiple monitors

    When using a wallpaper image on the lock screen and then plugging in one or more monitors with different resolutions the image rendering on the external monitors does not take the size difference into account. This results in the image being stretched correctly on the laptop monitor, but does not stretch correctly on external monitors with larger resolutions.

    opened by ldelossa 13
  • Fingerprint Support

    Fingerprint Support

    Hey there. GTKLock looks awesome. However, would it be possible to support libfprint finger print? Ideally, this setup works very nicely for swaylock: https://github.com/swaywm/swaylock/issues/61#issuecomment-965175390

    opened by ldelossa 10
  • per monitor background image

    per monitor background image

    Is there a way to define a background image per monitor? Like so in css: window#DP-1 {} or window.HDMI-A-1 {}

    Or a way for a single background to span across monitors. So you could do smth like this:

    grim /tmp/lock.png
    corrupter -mag 1 -boffset 3 -meanabber 1 /tmp/lock.png /tmp/lock.png
    gtklock -s style.css
    
    opened by Hippo0o 8
  • Crash when disabling display

    Crash when disabling display

    If you disable a display, for example when you connect your laptop to an external display, gtklock will crash, leaving the session unlocked.

    How to reproduce: Run gtklock &!; sleep 2; swaymsg output eDP-1 disable; sleep 2; swaymsg output eDP-1 enable

    opened by trbjo 8
  • Toggle password visibility

    Toggle password visibility

    Toggles the password visibility and sets the GTK entry hint to "Password". Haven't figured out how to make the hint visible when focused yet though...

    image

    opened by ErikReider 7
  • When using -b (background) the image should fill the screen

    When using -b (background) the image should fill the screen

    So I'll be the second issue too!

    I tried using the -b background option with an image smaller than my display and it put the image in the top left corner, leaving the rest of the screen exposed.

    It would be nice if it added black bars to fill in the screen or shrunk the image if it were larger than the display - like 'imv -f' - see image dump

    EDIT: I figured out how to do a screendump of the locked screen: dump

    opened by bhepple 6
  • Long pause unlocking after resume

    Long pause unlocking after resume

    Hey,

    Not a great bug report here since it seems pretty intermittent but have you noticed very long pause on unlock after resume? At first I thought gtklock crashed as it got stuck on the spinner. Then I let it sit for awhile and it actually did finish.

    opened by ldelossa 4
  • compilation error in fedora.

    compilation error in fedora.

    Hey,

    I pulled in all the dependencies to do a local build of gtklock. When attempting to build I get a clang flag's error tho.

    🖭  make
    /usr/bin/clang   gtklock.o include/wlr-input-inhibitor-unstable-v1-client-protocol.h wlr-input-inhibitor-unstable-v1-client-protocol.o auth.o input-inhibitor.o module.o source.o window.o  -lpam -lwayland-client -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lgtk-layer-shell -lgmodule-2.0 -pthread -lglib-2.0  -o gtklock
    clang-14: error: cannot specify -o when generating multiple output files
    make: *** [<builtin>: gtklock] Error 1
    

    Is this an issue with makefile or something on my end?

    opened by ldelossa 4
  • usability: search xdg paths for style.css

    usability: search xdg paths for style.css

    this pull request provides a search of both "/etc/gtklock/style.css" and "~/.config/gtklock/style.css", such that the command line flag to load style is no longer necessary.

    Signed-off-by: ldelossa [email protected]

    opened by ldelossa 3
  • Crash on entering wrong password

    Crash on entering wrong password

    Details

    Distro: archlinux sway 1.7-9 wlroots 0.15.1-5 gtklock 1abec48f698e08ebf712453ef8bc57bb76b75041

    Steps to reproduce

    1. Enter wrong password
    2. ???
    3. Crash

    Backtrace

    #0  __pthread_kill_implementation (threadid=<optimized out>, [email protected]=6, [email protected]=0) at pthread_kill.c:44
    Downloading 0.00 MB source file /usr/src/debug/glibc/nptl/pthread_kill.c
    44	     return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;                                                                                                       
    [Current thread is 1 (Thread 0x7faf8ab7f640 (LWP 24867))]
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, [email protected]=6, [email protected]=0) at pthread_kill.c:44
    #1  0x00007faf9508e3d3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
    #2  0x00007faf9503e838 in __GI_raise ([email protected]=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007faf95028535 in __GI_abort () at abort.c:79
    #4  0x00007faf9508245e in __libc_message ([email protected]=do_abort, [email protected]=0x7faf951c083e "%s\n") at ../sysdeps/posix/libc_fatal.c:155
    #5  0x00007faf950980cc in malloc_printerr ([email protected]=0x7faf951c39c0 "malloc(): unaligned tcache chunk detected") at malloc.c:5664
    #6  0x00007faf9509c5ec in tcache_get (tc_idx=<optimized out>) at malloc.c:3195
    #7  __GI___libc_malloc ([email protected]=24) at malloc.c:3313
    #8  0x00007faf9159bac7 in malloc_multiply (need=1, size=24) at ../systemd-stable/src/basic/alloc-util.h:104
    #9  prioq_new (compare_func=0x7faf91590030 <earliest_time_prioq_compare>) at ../systemd-stable/src/basic/prioq.c:35
    #10 prioq_ensure_allocated ([email protected]=0x7faf740527e8, compare_func=0x7faf91590030 <earliest_time_prioq_compare>) at ../systemd-stable/src/basic/prioq.c:60
    #11 0x00007faf9159f26f in setup_clock_data.constprop.0 ([email protected]=0x7faf74052770, [email protected]=0x7faf740527e0, clock=1) at ../systemd-stable/src/libsystemd/sd-event/sd-event.c:1193
    #12 0x00007faf91595b0f in sd_event_add_time (clock=1, usec=0, accuracy=0, callback=0x7faf9158fab0 <time_callback>, userdata=<optimized out>, ret=<optimized out>, e=<optimized out>)
        at ../systemd-stable/src/libsystemd/sd-event/sd-event.c:1261
    #13 varlink_attach_event (priority=0, e=<optimized out>, v=<optimized out>) at ../systemd-stable/src/shared/varlink.c:1948
    #14 userdb_connect (iterator=0x7faf740494f0, path=0x7faf74004550 "/run/systemd/userdb/io.systemd.Home", method=<optimized out>, more=<optimized out>, query=0x7faf7401b790)
        at ../systemd-stable/src/shared/userdb.c:376
    #15 0x00007faf915974c6 in userdb_start_query (iterator=0x7faf740494f0, method=0x7faf915a8da0 "io.systemd.UserDatabase.GetUserRecord", more=false, query=0x7faf740a0420, flags=9)
        at ../systemd-stable/src/shared/userdb.c:502
    #16 0x00007faf915978c6 in userdb_by_name (name=0x564c8f811610 "p00f", flags=9, ret=0x7faf8ab7e818) at ../systemd-stable/src/shared/userdb.c:637
    #17 0x00007faf9157b2b4 in userdb_getpwnam (errnop=<optimized out>, buflen=<optimized out>, buffer=<optimized out>, pwd=<optimized out>, name=<optimized out>)
        at ../systemd-stable/src/nss-systemd/userdb-glue.c:20
    #18 _nss_systemd_getpwnam_r (name=0x564c8f811610 "p00f", pwd=0x7faf740130d0, buffer=0x7faf74013100 "qemu", buflen=1024, errnop=0x7faf8ab7f5c0)
        at ../systemd-stable/src/nss-systemd/nss-systemd.c:325
    #19 0x00007faf950dc663 in __getpwnam_r (name=<optimized out>, resbuf=0x7faf740130d0, buffer=<optimized out>, buflen=1024, result=<optimized out>) at ../nss/getXXbyYY_r.c:273
    #20 0x00007faf95feeaa2 in pam_modutil_getpwnam () at /usr/lib/libpam.so.0
    #21 0x00007faf9186084a in  () at /usr/lib/security/pam_unix.so
    #22 0x00007faf9186090f in  () at /usr/lib/security/pam_unix.so
    #23 0x00007faf91860212 in  () at /usr/lib/security/pam_unix.so
    #24 0x00007faf9185da12 in pam_sm_authenticate () at /usr/lib/security/pam_unix.so
    #25 0x00007faf95fe891a in  () at /usr/lib/libpam.so.0
    #26 0x00007faf95fe8181 in pam_authenticate () at /usr/lib/libpam.so.0
    #27 0x0000564c8eca88f9 in auth_pwcheck (s=<optimized out>) at auth.c:60
    #28 0x0000564c8eca8f0b in window_pw_wait (data=0x564c8f8466f0) at window.c:90
    #29 0x00007faf953e8da5 in g_thread_proxy (data=0x564c8fa4ac60) at ../glib/glib/gthread.c:827
    #30 0x00007faf9508c54d in start_thread (arg=<optimized out>) at pthread_create.c:442
    #31 0x00007faf95111b14 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
    
    opened by p00f 2
  • Fails to unlock

    Fails to unlock

    Hate to be the first but ...

    I tried running gtklock with -l, -d or -i options as well as unadorned and it failed to accept my password.

    sway-1.6.1-4.fc35.x86_64
    wlroots-0.14.1-3.fc35.x86_64
    
    opened by bhepple 2
  • Flash of desktop screen on laptop resume

    Flash of desktop screen on laptop resume

    Hey,

    Gtklock working pretty great for me. However, if I shut my laptop screen and allow it to suspend, when I come back, I get a flash of my desktop windows before gtlock renders itself.

    Here is my swayidle configuration:

    exec swayidle -w \
             timeout 300   'gtklock -d -s ~/.config/gtklock/style.css' \
             timeout 600   'swaymsg "output * dpms off"' \
             resume        'swaymsg "output * dpms on"' \
             after-resume  'gtklock -d -s ~/.config/gtklock/style.css'
    

    I did have that after-resume line as before-sleep at one point, but that failed to invoke gtlock all together.

    opened by ldelossa 25
Releases(v1.1.0)
Owner
Jovan Lanik
Jovan Lanik
Embedded Flutter runtime targeting Embedded Linux with Wayland

ivi-homescreen IVI Homescreen for Wayland Strongly Typed (C++) Lightweight Clang 11 Release Stripped = 151k GCC 9.3 Release Stripped = 168k Source run

null 148 Jun 17, 2022
way-displays: Manage Your Wayland Displays

way-displays: Manage Your Wayland Displays Sets preferred mode or highest at maximum refresh Arranges left to right Auto scales based on DPI: 96 is a

Alexander Courtis 52 Jun 29, 2022
A friendly C++ library to create Wayland Compositors.

A friendly C++ library to create Wayland compositors that runs directly on top of DRM.

Eduardo Hopperdietzel 3 Jun 24, 2022
Extremely minimal raw Wayland greeter for greetd.

greetd-mini-wl-greeter An extremely simple raw Wayland greeter for greetd, inspired by lightdm-mini-greeter. Usage Follow the same steps as for e.g. g

Philip Jones 16 Jun 27, 2022
Uma prova de conceito para mostrar como rodar código nativo GTK dentro do Qt Framework :)

QTK Uma prova de conceito para mostrar como rodar código nativo GTK dentro do Qt Framework :) Nota: Como toda PoC que se preze esse projeto está incri

Natanael 1 Nov 27, 2021
C++ - Gtk - Granite - Flatpak

Description ElementaryCpp is a template for eOS applications, meaning that it's built over Gtkmm and C++17. Features GSchema Support ElementaryOS 6 Da

Jeyson Flores 8 Feb 26, 2022
Language that provides an abstraction to a PART of GTK difficulty

Welcome to GPP_COMPILER Language that provides an abstraction to a PART of GTK difficulty . To get projet on your computer, clone it using the followi

null 9 Jan 28, 2022
FFF is a decentralized blockchain based on IPFS/RIPPLE, which integrates lua virtual machine-based smart contracts.

FFF is a decentralized blockchain based on IPFS/RIPPLE, which integrates lua virtual machine-based smart contracts. It is also a software platform designed to help coordinate voluntary free market operations amongst a set of social actors.

gen2600 5 May 31, 2022
An implementation of physically based shading & image based lighting in D3D11, D3D12, Vulkan, and OpenGL 4.

Physically Based Rendering (c) 2017 - 2018 Michał Siejak (@Nadrin) An implementation of physically based shading model & image based lighting in vario

Michał Siejak 995 Jun 10, 2022
Scrollytroller is a crank-based USB controller, initially inteneded for use with Playdate's Pulp web-based game development tool

Scrollytroller Scrollytroller is a crank-based USB controller, initially inteneded for use with Playdate's Pulp web-based game development tool. This

Scott Lawrence 4 Feb 17, 2022
A Navigator 2.0 based Flutter widget that automatically splits the screen into two views based on available space

A Navigator 2.0 based Flutter widget that automatically splits the screen into two views based on available space

null 3 Feb 8, 2022
A CUDA-accelerated cloth simulation engine based on Extended Position Based Dynamics (XPBD).

Velvet Velvet is a CUDA-accelerated cloth simulation engine based on Extended Position Based Dynamics (XPBD). Why another cloth simulator? There are a

Vital Chen 10 Jun 9, 2022
QtVerbalExpressions - This Qt lib is based off of the C++ VerbalExpressions library. [MIT]

QtVerbalExpressions Qt Regular Expressions made easy This Qt lib is based off of the C++ VerbalExpressions library by whackashoe. Testing if we have a

null 53 May 12, 2022
Updated version of Silicos-it's shape-based alignment tool

shape-it Description Code for shape-it with openbabel3 and rdkit INSTALL Following example is the basic way to install the tool: git clone https://git

RDKit 22 Apr 27, 2022
ESP32 based DIY word clock project

Wordclock ESP32 based DIY wordclock project TL;DR: check out this ✨ demo video ✨ Another take on the classic DIY word clock. This one requires a laser

null 35 Feb 14, 2022
A USB-PD sniffer/injector/sink based on Google's Twinkie, re-designed to be manufactured by mere mortals.

Twonkie - a USB-PD sniffer based on Google's Twinkie Twonkie is a USB-PD sniffer/injector/sink based on a Google project called Twinkie, re-engineered

Joachim Fenkes 93 Jun 22, 2022
CQC (Charmed Quark Controller) a commercial grade, full featured, software based automation system. CQC is built on our CIDLib C++ development system, which is also available here on GitHub.

The CQC Automation System What It Is CQC is a commercial quality, software based automation system, suitable for residential or commercial application

Dean Roddey 57 Jun 24, 2022
Experimental telegram client based on official Android sources

Catogram Experimental telegram client based on official Android sources Catogram features: Message translator TGX Style of context menu VKUI Icons and

null 181 Jun 19, 2022
A USB-PD sniffer/injector/sink based on Google's Twinkie, re-designed to be manufactured by mere mortals.

Twonkie - a USB-PD sniffer based on Google's Twinkie Twonkie is a USB-PD sniffer/injector/sink based on a Google project called Twinkie, re-engineered

Joachim Fenkes 93 Jun 22, 2022