This is not a big deal, but what if the browser could automatically does the reload.
My solution has three parts.
- You can detect file change with Kicker.
- Set the focus to the browser and reload it with AppleScript.
- Set the focus back to your texteditor.
kicker -e "osascript reload-browser.applescript;focus-textmate.applescript" FOLDER_TO_WATCH
In my case this looks like this
kicker -e "osascript ~/workspace/MacGyver/reload-browser.applescript;osascript ~/workspace/MacGyver/focus-textmate.applescript" src/
You can find the reload_browser.applescript here and the focus-textmate.applescript here.
Post a Comment