Add initial support for emacsclient

performance
Fox Kiester 6 years ago
parent d91b1594b1
commit 7d3192286a
No known key found for this signature in database
GPG Key ID: 316E205D6017DBFF

@ -524,6 +524,8 @@ create_win_return_wid() {
pid=$(pgrep -xa chromium-browse | awk '!/--type/ {print $1}') pid=$(pgrep -xa chromium-browse | awk '!/--type/ {print $1}')
elif [[ $program =~ ^google-chrome ]]; then elif [[ $program =~ ^google-chrome ]]; then
pid=$(pgrep -xa chrome | awk '!/--type/ {print $1}') pid=$(pgrep -xa chrome | awk '!/--type/ {print $1}')
elif [[ $program =~ ^emacsclient ]]; then
blacklist=$(xdotool search --classname emacs)
fi fi
# need to redirect stdout or function won't return # need to redirect stdout or function won't return
eval "$1 > /dev/null &" eval "$1 > /dev/null &"
@ -542,6 +544,8 @@ create_win_return_wid() {
if [[ $program == discord ]]; then if [[ $program == discord ]]; then
wids=$(xdotool search --classname discord) wids=$(xdotool search --classname discord)
blacklist= blacklist=
elif [[ $program =~ ^emacsclient ]]; then
wids=$(xdotool search --classname emacs)
else else
wids=$(xdotool search --pid "$pid") wids=$(xdotool search --pid "$pid")
fi fi

Loading…
Cancel
Save