Add support for google chrome

Also fix support for chromium when it hasn't been previously started.
Addresses #20.
break
noctuid 9 years ago
parent 9bc0deade7
commit 77992cf141

@ -508,10 +508,13 @@ create_win_return_wid() {
blacklist=$(xdotool search --classname urxvtd) blacklist=$(xdotool search --classname urxvtd)
pid=$(pgrep urxvtd) pid=$(pgrep urxvtd)
eval "$program_command" eval "$program_command"
elif [[ $program =~ ^chromium ]]; then elif [[ $program =~ ^chromium ]] && pgrep -x chromium; then
# this may work fine # this may work fine
# pid=$(pgrep -o chromium) # 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" eval "$program_command"
else else
eval "$program_command" eval "$program_command"

Loading…
Cancel
Save