This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function watch_desktop() { | |
fswatch -e ".*" -i ".mov" ~/Desktop | while read filePath; do | |
if [ -f "${filePath}" ]; then | |
if [ -f "${filePath/.mov/.gif}" ]; then | |
echo 'exists.' | |
else | |
echo 'not exists.' | |
ffmpeg -i "$filePath" -r 30 -vf scale=680:-1 "${filePath/mov/gif}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/homebrew/bin/fish | |
function watch_desktop | |
fswatch -e ".*" -i ".mov" ~/Desktop | while read filePath; | |
set replacedFilePath (string replace .mov .gif $filePath) | |
if test -e $filePath | |
if test -e $replacedFilePath | |
echo 'exists.' | |
else | |
echo 'not exists.' |