diff --git a/tdrop b/tdrop index e19ce22..1eb38c6 100755 --- a/tdrop +++ b/tdrop @@ -508,10 +508,13 @@ create_win_return_wid() { blacklist=$(xdotool search --classname urxvtd) pid=$(pgrep urxvtd) eval "$program_command" - elif [[ $program =~ ^chromium ]]; then + elif [[ $program =~ ^chromium ]] && pgrep -x chromium; then # this may work fine # pid=$(pgrep -o chromium) - pid=$(pgrep -a chromium | awk '!/--type/ {print $1}') + pid=$(pgrep -xa chromium | awk '!/--type/ {print $1}') + eval "$program_command" + elif [[ $program =~ ^google-chrome ]] && pgrep -x chrome; then + pid=$(pgrep -xa chrome | awk '!/--type/ {print $1}') eval "$program_command" else eval "$program_command"