Created
March 24, 2014 08:19
-
-
Save syui/9736256 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
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