Skip to content

Instantly share code, notes, and snippets.

@syui
Created March 24, 2014 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syui/9736256 to your computer and use it in GitHub Desktop.
Save syui/9736256 to your computer and use it in GitHub Desktop.
#!/bin/bash
while :
do
var=`echo "
-- AppleScript
-- http://stackoverflow.com/questions/7921378/check-finder-activity
set thestatus to \"0\"
tell application \"System Events\"
set theList to get the title of every window of process \"Finder\"
repeat with theItem in theList
if theItem contains \"コピー\" then
set thestatus to \"1\"
end if
end repeat
end tell
thestatus
" | osascript -`
case "$var" in
"1" ) echo copying > /dev/null;;
"0" ) growlnotify -t 'Finder' -m 'copy done'
break ;;
esac
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment