packaged abduco

This commit is contained in:
Felix Van der Jeugt 2018-03-25 14:23:18 +02:00
parent bfc04be0d0
commit 308b510ce7
No known key found for this signature in database
GPG Key ID: 58B209295023754D

View File

@ -1,27 +0,0 @@
#!/bin/bash
if [ -t 1 ]; then
pick() { fzf --height 10; }
run() { /usr/bin/abduco -A "$@" "$@"; clear; }
else
pick() { dmenu; }
run() { exec st -e /usr/bin/abduco -A "$@" "$@"; }
fi
result="$(case "$1" in
list) find ~/.abduco -not -executable -type s -exec basename \{\} \; | cut -d@ -f1 | pick ;;
run|watch) dmenu_path | pick ;;
*) echo "other" ;;
esac)"
[ -z "$result" ] && exit 1
if test "$result" = "other"; then
exec /usr/bin/abduco "$@"
fi
case "$1" in
watch) result="watch $result" ;&
list|run) run $result ;;
esac