Add proximity lock toggle on the config menu

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Stacy Harper 2021-04-13 17:59:39 +02:00 committed by Maarten van Gompel
parent f4ee396394
commit 6426a94e46
4 changed files with 40 additions and 4 deletions

View file

@ -25,7 +25,7 @@ finish() {
echo "sxmo_modemcall: $1">&2
notify-send "$1"
fi
kill $LOCKPID
[ -n "$LOCKPID" ] && kill $LOCKPID
pkill -9 dmenu
exit 1
}
@ -257,8 +257,11 @@ incomingcallmenu() {
modem_n || finish "Couldn't determine modem number - is modem online?"
sxmo_proximitylock.sh &
LOCKPID="$!"
# do not duplicate proximity lock if already running
if ! pgrep -f sxmo_proximitylock.sh > /dev/null; then
sxmo_proximitylock.sh &
LOCKPID="$!"
fi
"$@" &
MAINPID="$!"