configuration/local/bin/abduco
2017-02-16 11:46:13 +01:00

21 lines
483 B
Bash
Executable File

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