switch to xss-lock
This commit is contained in:
parent
579f12df87
commit
9275ae1f26
@ -125,8 +125,9 @@ bar {
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id pa-applet
|
||||
|
||||
bindsym $mod+Ctrl+l exec --no-startup-id ~/etc/lock.sh
|
||||
exec --no-startup-id xautolock -time 5 -locker ~/etc/lock.sh
|
||||
bindsym $mod+Ctrl+l exec --no-startup-id loginctl lock-session
|
||||
exec --no-startup-id xset s 300
|
||||
exec --no-startup-id xss-lock -lv /home/gebner/etc/lock.sh
|
||||
|
||||
exec_always --no-startup-id ifelse(hostname,
|
||||
[theba], [feh --bg-fill ~/Pictures/20140915-133957-DSC_7414.jpg],
|
||||
|
54
lock.sh
54
lock.sh
@ -1,2 +1,52 @@
|
||||
#!/bin/sh
|
||||
exec i3lock -d -I 5 -c 777777
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Example locker script -- demonstrates how to use the --transfer-sleep-lock
|
||||
# option with i3lock's forking mode to delay sleep until the screen is locked.
|
||||
|
||||
## CONFIGURATION ##############################################################
|
||||
|
||||
# Options to pass to i3lock
|
||||
i3lock_options="-I 5 -c 777777"
|
||||
|
||||
# Run before starting the locker
|
||||
pre_lock() {
|
||||
#mpc pause
|
||||
return
|
||||
}
|
||||
|
||||
# Run after the locker exits
|
||||
post_lock() {
|
||||
return
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
pre_lock
|
||||
|
||||
# We set a trap to kill the locker if we get killed, then start the locker and
|
||||
# wait for it to exit. The waiting is not that straightforward when the locker
|
||||
# forks, so we use this polling only if we have a sleep lock to deal with.
|
||||
if [[ -e /dev/fd/${XSS_SLEEP_LOCK_FD:--1} ]]; then
|
||||
kill_i3lock() {
|
||||
pkill -xu $EUID "$@" i3lock
|
||||
}
|
||||
|
||||
trap kill_i3lock TERM INT
|
||||
|
||||
# we have to make sure the locker does not inherit a copy of the lock fd
|
||||
i3lock $i3lock_options {XSS_SLEEP_LOCK_FD}<&-
|
||||
|
||||
# now close our fd (only remaining copy) to indicate we're ready to sleep
|
||||
exec {XSS_SLEEP_LOCK_FD}<&-
|
||||
|
||||
while kill_i3lock -0; do
|
||||
sleep 0.5
|
||||
done
|
||||
else
|
||||
trap 'kill %%' TERM INT
|
||||
i3lock -n $i3lock_options &
|
||||
sleep 1; xset dpms force off
|
||||
wait
|
||||
fi
|
||||
|
||||
post_lock
|
||||
|
@ -187,6 +187,7 @@ before layers configuration."
|
||||
(setq mu4e-view-show-images t
|
||||
mu4e-view-image-max-width 1000
|
||||
mu4e-view-image-max-height 1000)
|
||||
(setq mu4e-msg2pdf "/home/gebner/bin/msg2pdf")
|
||||
(when (fboundp 'imagemagick-register-types)
|
||||
(imagemagick-register-types))
|
||||
(setq mu4e-html2text-command "elinks -dump")
|
||||
|
Loading…
Reference in New Issue
Block a user