Added option to record gifs using Byzanz.

This commit is contained in:
sheldonmlee 2021-05-05 15:07:25 +08:00
parent 7a4672075f
commit 845fc2c38c
2 changed files with 13 additions and 1 deletions

View File

@ -9,7 +9,8 @@ fi
options=" options="
1) Fullscreen\n\ 1) Fullscreen\n\
2) Selection 2) Selection\n\
3) Record screen\n\
" "
#echo -e $options #echo -e $options
@ -26,5 +27,8 @@ case $option in
2*) 2*)
s_scrot s_scrot
;; ;;
2*)
ffmpeg_record
;;
esac esac

View File

@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
# screenshots using scrot # screenshots using scrot
scrot_dir=$HOME/screenshots/ scrot_dir=$HOME/screenshots/
date_format='%Y-%m-%d_%H-%M-%S' date_format='%Y-%m-%d_%H-%M-%S'
s_scrot() { s_scrot() {
name=$(date +${date_format}_sel.png) name=$(date +${date_format}_sel.png)
path="${scrot_dir}${name}" path="${scrot_dir}${name}"
@ -17,6 +19,12 @@ f_scrot() {
xclip -sel clip $path -t image/png xclip -sel clip $path -t image/png
} }
# screen recorder
byzanz_10() {
name=$(date +${date_format}.gif)
byzanz-record -c -d 10 --delay=0 "${scrot_dir}${name}"
}
# cd into config dir # cd into config dir
cfdir() cfdir()
{ {