From 77992cf1416d787b4eb16d9d45f579ba26ad26d1 Mon Sep 17 00:00:00 2001 From: noctuid Date: Mon, 4 Jul 2016 14:43:00 -0400 Subject: [PATCH] Add support for google chrome Also fix support for chromium when it hasn't been previously started. Addresses #20. --- tdrop | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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"