Update 2023-01-21 16:52 OpenBSD/amd64

This commit is contained in:
c0dev0id 2023-01-21 16:52:02 +01:00
parent 2be9a3cd97
commit 6460545f25
2 changed files with 45 additions and 8 deletions

43
.bin/toot-wrapper Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
usage() {
echo "toot-wrapper <account>"
exit 2
}
[ -z "$1" ] \
&& usage
menu() {
cat <<EOF | fzf -e
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

10
.kshrc
View File

@ -132,14 +132,8 @@ alias spectrwmrc="vim ~/.config/spectrwm/spectrwm.conf"
alias rem="remind -c+cl3 ~/.reminders" alias rem="remind -c+cl3 ~/.reminders"
# mastodon # mastodon
toot-sh() { toot $@ -u sh@bsd.network; } alias toot-sh="toot-wrapper sh@bsd.network"
toot-uug() { toot $@ -u uugrn@chaos.social; } alias toot-uug="toot-wrapper uugrn@chaos.social"
alias toot-sh-post="toot post -u sh@bsd.network -e vim"
alias toot-uug-post="toot post -u uugrn@chaos.social -e vim"
alias toot-sh-reply="toot post -r $1 -u sh@bsd.network -e vim"
alias toot-uug-reply="toot post -r $1 -u uugrn@chaos.social -e vim"
alias toot-sh-tl="toot timeline -c 1 -u sh@bsd.network"
alias toot-uug-tl="toot timeline -c 1 -u uugrn@chaos.social"
# mupdf # mupdf
alias mupdf="mupdf-gl -XJ" alias mupdf="mupdf-gl -XJ"