# Kill any previous powerline-awesome instance
# A window manager like Awesome may later start a new instance so it can appear at the wibar
-POWERLINE_PID="`ps -o pid,command | grep powerline-awesome.py | cut -d ' ' -f 1`"
+#POWERLINE_PID="`ps -ax -o pid,command | grep 'powerline-awesome.py' | grep -v grep | awk '{ print $1 }'`"
+#POWERLINE_PID="`ps -x -o pid,command | grep '^/usr/bin/python /usr/share/powerline/bindings/awesome/powerline-awesome.py' | cut -d ' ' -f 1`"
+POWERLINE_PID="`pidof -x /usr/share/powerline/bindings/awesome/powerline-awesome.py`"
if [ ! -z "$POWERLINE_PID" ]; then
kill $POWERLINE_PID
fi