diff options
Diffstat (limited to '.config/init/funcs')
-rwxr-xr-x | .config/init/funcs/scap | 8 | ||||
-rwxr-xr-x | .config/init/funcs/ssh-scrot | 11 |
2 files changed, 12 insertions, 7 deletions
diff --git a/.config/init/funcs/scap b/.config/init/funcs/scap index f87eb93..94c39f7 100755 --- a/.config/init/funcs/scap +++ b/.config/init/funcs/scap @@ -1,18 +1,20 @@ #!/usr/bin/env zsh # capture webm +source $HOME/.config/init/vars + xset q [[ $? -ne 0 ]] && return 1 archey3 sleep .2 -if [[ -e '/tmp/cap.mp4' ]]; then - rm '/tmp/cap.mp4' || return 1 +if [[ -e "$tmpdir/cap.mp4" ]]; then + rm "$tmpdir/cap.mp4" || return 1 fi echo 'recording...' ffmpeg -v panic -video_size 1920x1080 -framerate 20 -f x11grab -i :0.0 \ -f pulse -ac 2 -i default -af aresample=async=1 \ - -c:v libx264 -q 0 -preset ultrafast '/tmp/cap.mp4' + -c:v libx264 -q 0 -preset ultrafast "$tmpdir/cap.mp4" diff --git a/.config/init/funcs/ssh-scrot b/.config/init/funcs/ssh-scrot index 8fa243c..e5a3a36 100755 --- a/.config/init/funcs/ssh-scrot +++ b/.config/init/funcs/ssh-scrot @@ -1,5 +1,8 @@ #!/usr/bin/env zsh # take a screenshot, upload to /img/scrot, and update current symlink +# + +source $HOME/.config/init/vars archey3 @@ -30,10 +33,10 @@ done echo 'cheese!' sleep .1 -scrot /tmp/$name.png -convert -scale 250x /tmp/$name.png /tmp/${name}_small.png +scrot $tmpdir/$name.png +convert -scale 250x $tmpdir/$name.png $tmpdir/${name}_small.png -scp /tmp/$name.png /tmp/${name}_small.png airen-no-jikken.icu:http/img/scrot/$date +scp $tmpdir/$name.png $tmpdir/${name}_small.png airen-no-jikken.icu:http/img/scrot/$date echo "https://airen-no-jikken.icu/img/scrot/$date/$name.png" | tr -d '\n' | xclip -i -selection clipboard echo "https://airen-no-jikken.icu/img/scrot/$date/$name.png" | tr -d '\n' | xclip -i -selection primary @@ -42,4 +45,4 @@ echo "https://airen-no-jikken.icu/img/scrot/$date/${name}_small.png" | tr -d '\n echo 'sent!' -rm /tmp/$name.png /tmp/${name}_small.png +rm $tmpdir/$name.png $tmpdir/${name}_small.png |