home/.config/dtfscripts/tasks/kill_krunner.sh

21 lines
329 B
Bash
Raw Normal View History

#! /bin/sh
if ! pgrep krunner > /dev/null 2>&1; then
exit 0
fi
killall krunner
for i in {1..100}; do
if ! pgrep krunner; then break ;fi
sleep 0.01
if (( $i > 99 )); then
killall -9 krunner
fi
done
if pgrep krunner > /dev/null 2>&1; then
tsk_log "Failed to kill krunner"
exit 1
else
tsk_log "Killed krunner"
exit 0
fi