diff --git a/local/bin/delegator b/local/bin/delegator new file mode 100755 index 0000000..0ffe00c --- /dev/null +++ b/local/bin/delegator @@ -0,0 +1,51 @@ +#!/bin/sh + +set -e + +if [ -t 1 ]; then + pick() { + sk + } + inject() { + echo "$@" + } +else + window="$(xdotool getwindowfocus)" + pick() { + dmenu -i -l 10 + } + inject() { + xdotool type --clearmodifiers --window "$window" "$*" + xdotool windowfocus "$window" + } +fi + +choice="$(pick <