Add install hook to replace xflock4
This commit is contained in:
parent
c1d780be2c
commit
4539f742fc
31
hooks/ebuild_install_post/xflock4.bash
Normal file
31
hooks/ebuild_install_post/xflock4.bash
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
|
||||||
|
if [[ "${CATEGORY}/${PN}" == "xfce-base/xfce4-session" ]] ; then
|
||||||
|
elog "Replacing /usr/$(exhost --target)/bin/xflock4!"
|
||||||
|
|
||||||
|
cat << EOF > "${IMAGE}"/usr/$(exhost --target)/bin/xflock4
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=/bin:/usr/bin
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
# else run another access locking utility, if installed
|
||||||
|
for lock_cmd in \
|
||||||
|
"i3lock -c 000000"
|
||||||
|
do
|
||||||
|
set -- \$lock_cmd
|
||||||
|
if command -v -- \$1 >/dev/null 2>&1; then
|
||||||
|
\$lock_cmd >/dev/null 2>&1 &
|
||||||
|
# turn off display backlight:
|
||||||
|
xset dpms force off
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# else access locking failed
|
||||||
|
exit 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user