attach from terminal with fzf
This commit is contained in:
parent
f37e5e5ea6
commit
5c4318a022
@ -1,8 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/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
|
result="$(case "$1" in
|
||||||
list) find ~/.abduco -not -executable -type s -exec basename \{\} \; | cut -d@ -f1 | dmenu ;;
|
list) find ~/.abduco -not -executable -type s -exec basename \{\} \; | cut -d@ -f1 | pick ;;
|
||||||
run|watch) dmenu_path | dmenu ;;
|
run|watch) dmenu_path | pick ;;
|
||||||
*) echo "other" ;;
|
*) echo "other" ;;
|
||||||
esac)"
|
esac)"
|
||||||
|
|
||||||
@ -13,8 +21,7 @@ if test "$result" = "other"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
list) exec st -e /usr/bin/abduco -A "$result" ;;
|
watch) result="watch $result" ;&
|
||||||
watch) result="watch $result" ;&
|
list|run) run $result ;;
|
||||||
run) exec st -e /usr/bin/abduco -A "$result" $result ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user