Skip to content

eylles/betterxsecurelock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

245 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BetterXsecurelock

a wrapper to xsecurelock

screenshot 1 screenshot 2 screenshot 3 screenshot 4 screenshot 5 screenshot 6 screenshot 7 screenshot 8

this provides wrapping for xss-lock, xsecurelock and multiple programs to use as screensavers, mpv, nsxiv, xterm with terminal screensavers, integration with pywal, a status bar inside the screensaver that only shows when the auth dialog is on screen and shows day, time and battery, a proxy for dbus so that programs can use the org.freedesktop.ScreenSaver dbus interface to request to lock, unlock and inhibit the screensaver.

more features are to come but for now this is very alpha software that has been wrangled to work on my setup.

how do i use this

you don't, at least for now as this hasn't even had a v0.0.0 release, but if you insist be warned i'm still in the process of implementing config options and what is available now in the sample config file is what is available, everything else you'll have to use this almost like suckless software, ie: modifying the source code directly.

first and foremost satisfy the dependencies, you need to have the following software installed:

software use
xsecurelock: the program doing the hard work.
xss-lock: for launching xsecurelock and listening to screen and suspend events
nsxiv: for displaying images.
mpv: for video
xterm: statusbar and terminal screensavers
xdotool: statusbar
unimatrix: matrix screensaver (optional)
cmatrix: matrix screensaver
pipes.sh: pipes screensaver (optional)
sssnake: snake screensaver (optional)
fire: for the fire screensaver (optional)
btop: for the btop screensaver
pywal16: for the theme
on_ac_power: show the charge icon on the statusbar
xdg-screensaver: very necessary
brightness-udev: udev rules to allow access to the /sys/class/backlight/*/brightness subsystem
systemact automatic system suspend some time after lock
psmisc: for pstree
noto sans cjk jp: font for the auth dialog
python dbus dbus-screenlock-freedesktop.py
python xlib dbus-screenlock-freedesktop.py

Once you have everything run make install and the makefile will copy all the scripts to your path, for xdg-screensaver just use the bundled one, for on_ac_power if you are not on a debian based distro this repo bundles the script into the tree just run make install_on_ac_power, on debian and derivates just install the powermgmt-base package if not already installed, you need to have a pywal colorscheme or edit the code to change the color definitions as those colors will be used for the auth dialog and statusbar, i will eventually add proper themes support just need to define a format. Then you have to copy the sample config file to ´"${XDG_CONFIG_HOME:-${HOME}/.config}/better-xsecurelock/config"´ and edit the options to your liking, the config is outright sourced by every script like any other shell script file despite the lack of extension or shebang, it however has a vim modeline just to be explicit about the syntax

now you just have to run lockerd for the screen locker daemon and dbus-screenlock-freedesktop.py if you want to allow programs that only speak dbus to inhibit the screensaver. add them to either your autostart programs or run them somewehre in your xinitrc or xsessionrc.

If all goes well you should have a xsecurelock similar to the one on my screenshots.

TODO:

  • wrap and use the screensaver modules provided by xsecurelock
  • add a generic xterm screensaver module to run the terminal based savers
  • define a proper theme format and parse the config for it
  • add the ability to configure auth and savers options (fonts, timeout, etc)
  • make the dbus-screenlock-freedesktop search window that inhibits the screensaver by caller name and pid instead of just using whatever is focused at the time
  • make lockerd set the x_screen_saver_extension and dpms times from config when the screensaver isn't being inhibited
  • eliminate usage of pgrep

LICENSE

This repository contains components under different licenses.

  • The main source files are licensed under the GNU GPLv2.0 or later (LICENSE-GPL-2.0).
  • Small libraries and utilities are licensed under the Apache License 2.0 (LICENSE-APACHE-2.0).
  • The bright-helper as well as the 90-blight.rules file which is a modified version of the debian patched version of the original brightnessctl repo are licensed under the Expat/MIT (LICENSE-MIT)
  • Files vendored from other projects such as on_ac_power and xdg-screensaver are available under their specific license terms mentioned on their identifiers.

Individual files contain explicit SPDX-License-Identifier headers indicating their respective license terms.

About

xsecurelock looking better than ever and easy to integrate in any setup, includes a dbus proxy

Topics

Resources

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE-APACHE-2.0
GPL-2.0
LICENSE-GPL-2.0
Unknown
LICENSE-MIT

Stars

17 stars

Watchers

3 watching

Forks

Releases

No releases published

Contributors