-
Notifications
You must be signed in to change notification settings - Fork 32
Home
Oliver Webb edited this page Jun 18, 2025
·
26 revisions
- Lock screen:
$ gtklock - Lock screen and daemonize:
$ gtklock -d - Specify config file:
$ gtklock -c /path/to/config.ini - Specify style file:
$ gtklock -s ./assets/example-style.css - Load a module:
$ gtklock -m /path/to/module.so - Show options:
$ gtklock --help-all
In general, use gtklock when manually invoking the locker, and gtklock -d when it is being automatically invoked by something like swayidle.
By default gtklock will load ~/.config/gtklock/config.ini.
Some available options are:
- gtk-theme - Specify GTK theme
- style - Specify style file
- layout - Load XML layout file
- background - Load background
- modules - Load module(s)
- time-format - Specify a strftime(3) time format for the clock
- date-format - Set date format
- follow-focus - Follow focus between monitors
- idle-hide - Hide form when idle
- idle-timeout - Idle timeout in seconds
- start-hidden - Start with hidden form
- lock-command - Command to execute after locking
- unlock-command - Command to execute after unlocking
- monitor-priority - Set monitor focus priority
All options should be in the main group.
[main]
gtk-theme=Adwaita-darkwindow {
background-image: url("background.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-color: black;
}The background url can be absolute or relative to the style file. If the image fails to load, the color is used.
Each window is named after the output, for example window#eDP-1 or window#HDMI-A-1.
A full example can be found here.
- https://docs.gtk.org/gtk3/css-overview.html
- https://github.com/jovanlanik/gtklock/issues/2
- https://github.com/jovanlanik/gtklock/issues/14
- https://github.com/jovanlanik/gtklock/issues/16
Add the lines to the top of /etc/pam.d/gtklock:
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth sufficient pam_fprintd.so
- https://wiki.archlinux.org/title/Fprint
- https://github.com/swaywm/swaylock/issues/61#issuecomment-965175390
- https://github.com/jovanlanik/gtklock/issues/11
Gtklock supports modules. You can load modules by running $ gtklock -m /path/to/module.so or adding modules=/path/to/module.so to your config.
Multiple modules can be included with:
modules=module1.so;module2.so;module3.so
- https://github.com/jovanlanik/gtklock-userinfo-module
- https://github.com/jovanlanik/gtklock-powerbar-module
- https://github.com/jovanlanik/gtklock-playerctl-module
- https://gitlab.com/wef/gtklock-runshell-module
- https://gitlab.com/wef/gtklock-countdown-module
- https://git.sr.ht/~aperezdc/gtklock-dpms-module
- https://github.com/progandy/gtklock-virtkb-module