configuration/local/bin/abduco
2016-11-03 10:26:10 +01:00

21 lines
484 B
Bash
Executable File

#!/bin/bash
result="$(case "$1" in
list) abduco | tail -n +2 | cut -f3 | 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) if abduco | grep -q "$result"; then exec urxvtc -e /usr/bin/abduco -a "$result"; fi ;;
watch) result="watch $result" ;&
run) exec urxvtc -e /usr/bin/abduco -A "$result" $result ;;
esac