home/.config/concession/tasks/10_kill_krunner.sh

25 lines
392 B
Bash
Raw Normal View History

2018-10-21 02:33:31 -05:00
#! /bin/sh
main() {
if ! pgrep krunner > /dev/null 2>&1; then
return 0
fi
killall krunner
for i in {1..100}; do
if ! pgrep krunner > /dev/null 2>&1; 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" 1
return 1
else
tsk_log "Killed krunner"
return 0
fi
}
main $@