From 7d3192286a6935011dfb49a253677427674750c3 Mon Sep 17 00:00:00 2001 From: Fox Kiester Date: Sat, 10 Nov 2018 16:27:38 -0500 Subject: [PATCH] Add initial support for emacsclient --- tdrop | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tdrop b/tdrop index 1ad0606..5404b90 100755 --- a/tdrop +++ b/tdrop @@ -524,6 +524,8 @@ create_win_return_wid() { pid=$(pgrep -xa chromium-browse | awk '!/--type/ {print $1}') elif [[ $program =~ ^google-chrome ]]; then pid=$(pgrep -xa chrome | awk '!/--type/ {print $1}') + elif [[ $program =~ ^emacsclient ]]; then + blacklist=$(xdotool search --classname emacs) fi # need to redirect stdout or function won't return eval "$1 > /dev/null &" @@ -542,6 +544,8 @@ create_win_return_wid() { if [[ $program == discord ]]; then wids=$(xdotool search --classname discord) blacklist= + elif [[ $program =~ ^emacsclient ]]; then + wids=$(xdotool search --classname emacs) else wids=$(xdotool search --pid "$pid") fi