#!/bin/bash ps_out=`ps -ef | grep conky | grep -v 'grep' | grep -v $0` result=$(echo $ps_out | grep "$1") echo $result if [[ "$result" != "" ]];then killall conky else conky -c ~/.config/conky/mocha.conf fi