remove capture from bash/bashrc, move to randomuser/utils/sh/capture

This commit is contained in:
randomuser 2023-01-15 16:49:15 -06:00
parent ae09b5fff9
commit c1e747a7c7
1 changed files with 0 additions and 57 deletions

View File

@ -62,63 +62,6 @@ start_bitlbee() {
bitlbee #-D -c $HOME/.config/bitlbee/config -d $HOME/.config/bitlbee/
}
record() {
tmp=$(mktemp)
res=$(xrandr |
grep ' connected' |
awk -F' ' '{print $1 " " $4}' |
awk -F'+' '{print $1}' |
fzy |
awk -F' ' '{print $2}' )
medium=$(printf ".mp4\n.png\n" | fzy)
output="$tmp$medium"
case "$medium" in
*mp4*)
printf "> starting video capture...\n"
ffmpeg -video_size "$res" -f x11grab -framerate 60 -i $DISPLAY -preset ultrafast -pix_fmt yuv420p "$output"
;;
*png*)
printf "> taking screenshot...\n"
# for a screenshot, we usually want an a s t h e t i c
ffmpeg -f x11grab -video_size "$res" -i $DISPLAY -vframes 1 "$output" -loglevel quiet # be quiet
;;
*)
printf "not a choice\n"
return
esac
printf "> written to %s\n" "$output"
while true; do
result=$(printf "delete\nmove to home directory\nupload to pastebin\nreview footage\nquit\n" | fzy --prompt="what next? ")
case "$result" in
*upload*)
paste "$output" | xclip -i
printf "> pasted! check your clipboard\n"
;;
*review*)
[ "$medium" = ".mp4" ] && mpv "$output" && continue
feh "$output"
;;
*delete*)
printf "> removing target file...\n"
rm "$output"
return
;;
*home*)
printf "> warping your capture to home...\n"
name=$(echo "capture$medium" | fzy --prompt="name please? ")
mv "$output" "$HOME/$name"
return
;;
*quit*)
return
;;
esac
done
}
alias gs='git status'
alias f=files
alias lofi="mpv https://www.youtube.com/watch?v=jfKfPfyJRdk --no-video"