smxo_appmenu.sh: Use 'which' to kill pre-existing instances

We may have 'sxmo_appmenu.sh' in the full commandline of other tools
which we don't want to kill, for example lisgd arguments.

Signed-off-by: Miles Alan <m@milesalan.com>
This commit is contained in:
Daniel Edgecumbe 2020-06-30 15:29:56 +01:00 committed by Miles Alan
parent 4079d4d7e1
commit e648f73291

View file

@ -266,7 +266,7 @@ mainloop() {
) & wait
}
pgrep -f sxmo_appmenu.sh | grep -Ev "^${$}$" | xargs kill -TERM
pgrep -f "$(which sxmo_appmenu.sh)" | grep -Ev "^${$}$" | xargs kill -TERM
DMENUIDX=0
PICKED=""
ARGS="$*"