configuration/local/bin/abduco

21 lines
500 B
Plaintext
Raw Normal View History

2016-09-15 10:13:22 +02:00
#!/bin/bash
result="$(case "$1" in
2016-11-16 11:15:38 +01:00
list) abduco | tail -n +2 | grep -v '^\*' | cut -f3 | dmenu ;;
2016-09-15 10:13:22 +02:00
run|watch) dmenu_path | dmenu ;;
*) echo "other" ;;
esac)"
2016-11-03 10:26:10 +01:00
[ -z "$result" ] && exit 1
2016-09-15 10:13:22 +02:00
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