Update 2024-02-14 07:51 OpenBSD/amd64-x13
This commit is contained in:
47
.bin/OLD/toot-wrapper
Executable file
47
.bin/OLD/toot-wrapper
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
echo "toot-wrapper <account>"
|
||||
exit 2
|
||||
}
|
||||
|
||||
[ -z "$1" ] \
|
||||
&& usage
|
||||
|
||||
|
||||
[ ! -z "$2" ] \
|
||||
&& EXTRA="-q $2"
|
||||
|
||||
menu() {
|
||||
cat <<EOF | fzf -e -1 $EXTRA
|
||||
notifications
|
||||
post
|
||||
reply
|
||||
search
|
||||
thread
|
||||
timeline
|
||||
command
|
||||
quit
|
||||
EOF
|
||||
}
|
||||
|
||||
input() {
|
||||
echo -n "$1:"
|
||||
read -r
|
||||
}
|
||||
|
||||
while true
|
||||
do
|
||||
case $(menu) in
|
||||
notifications) toot notifications -u $1 -r; ;;
|
||||
timeline) toot timeline -u $1 -c 1 -r; ;;
|
||||
post) toot post -u $1 -e vim; ;;
|
||||
thread) input "Thread ID"; toot thread "$REPLY" -u $1; ;;
|
||||
reply) input "Reply ID"; toot post -r "$REPLY" -u $1 -e vim; ;;
|
||||
search) input "Search Term"; toot search "$REPLY" -u $1; ;;
|
||||
command) input "Command"; toot $REPLY -u $1; ;;
|
||||
quit) exit 0; ;;
|
||||
esac
|
||||
echo "Press any key to continue"
|
||||
read
|
||||
done
|
||||
Reference in New Issue
Block a user