Skip to content

Instantly share code, notes, and snippets.

View activeguild's full-sized avatar
🐷
On vacation

j1ngzoue activeguild

🐷
On vacation
View GitHub Profile
#!/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}"
#!/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.'