###################################################
# multiple instances would overlap
-if ! pgrep instantshutdown | wc -l | grep -q '1'; then
- echo "instantmenu already running"
+if [ "$(pgrep instantshutdown | wc -l)" -gt 2 ]; then
+ pgrep instantshutdown | wc -l
+ echo "instantshutdown already running"
exit
fi
zconfirm() {
if wmctrl -l | grep -q '..'; then
echo "running applications found"
- if zenity --question --text="there are apps running, sure you want to $1"; then
+ if imenu -c "there are apps running, sure you want to $1?"; then
echo "yes"
return 0
else