Initial commit

This commit is contained in:
2020-04-23 14:50:36 +02:00
commit 0c743950ac
47 changed files with 3838 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
# specifies the time (in seconds) to wait for response to a prompt by auth_x11 before giving up and
# reverting to the screen saver.
XSECURELOCK_AUTH_TIMEOUT=10
# specifies the time (in seconds) before telling X11 to fully blank the screen; a negative value
# disables X11 blanking. The time is measured since the closing of the auth window or xsecurelock
# startup. Setting this to 0 is rather nonsensical, as key-release events (e.g. from the keystroke
# to launch xsecurelock or from pressing escape to close the auth dialog) always wake up the screen.
XSECURELOCK_BLANK_TIMEOUT=10
# create a second full-screen window to obscure window content in case a running compositor unmaps
# its own window. Helps with some instances of bad compositor behavior (such as compositor crashes/
# restarts, but also compton has been caught at drawing notification icons above the screen locker
# when not using the GLX backend), should prevent compositors from unredirecting as it's 1 pixel
# smaller than the screen from every side, and should otherwise be harmless, so it's enabled by
# default.
XSECURELOCK_COMPOSITE_OBSCURER=1
# the date format to show. Defaults to the locale settings.
XSECURELOCK_DATETIME_FORMAT=%F %T
# time_ shows the current time since the epoch on each keystroke. This may be the most secure mode,
# as it gives feedback to keystroke based exclusively on public information, and does not carry
# over any state between keystrokes whatsoever - not even some form of randomness.
# time_hex: same as time, but in microseconds and hexadecimal. "Because we can".
XSECURELOCK_PASSWORD_PROMPT=time_hex
# whether to show local date and time on the login. Disabled by default.
XSECURELOCK_SHOW_DATETIME=1
# whether to show the hostname on the login screen of auth_x11. Possible values are 0 for not
# showing the hostname, 1 for showing the short form, and 2 for showing the long form.
XSECURELOCK_SHOW_HOSTNAME=0
# whether to show the username on the login screen of auth_x11.
XSECURELOCK_SHOW_USERNAME=0

View File

@@ -0,0 +1,57 @@
#!/bin/bash
# !Modified! /usr/share/doc/xss-lock/transfer-sleep-lock-generic-delay.sh
# Example locker script -- demonstrates how to use the --transfer-sleep-lock
# option with a fixed delay to give simple lockers a little bit of time to lock
# the screen before the system goes the sleep.
## CONFIGURATION ##############################################################
# hack: remove space from IFS so that the config can have spaces in the keys
# TODO: find a better way to do this (I'm desperate)
IFS=$'\n\t'
# Command to start the locker (should not fork)
# Beware the tabs instead of spaces!
locker="env $(grep -v '^#\|^$' ~/.config/xsecurelock/config) xsecurelock"
# Delay in seconds. Note that by default systemd-logind allows a maximum sleep
# delay of 5 seconds.
sleep_delay=1
# Run before starting the locker
pre_lock() {
# mpc pause
killall -q compton
amixer -q -D pulse sset Master mute
return
}
# Run after the locker exits
post_lock() {
compton -b
return
}
###############################################################################
pre_lock
# kill locker if we get killed
trap 'kill %%' TERM INT
if [[ -e /dev/fd/${XSS_SLEEP_LOCK_FD:--1} ]]; then
# lock fd is open, make sure the locker does not inherit a copy
$locker {XSS_SLEEP_LOCK_FD}<&- &
sleep $sleep_delay
# now close our fd (only remaining copy) to indicate we're ready to sleep
exec {XSS_SLEEP_LOCK_FD}<&-
else
$locker &
fi
wait # for locker to exit
post_lock