Skip to content

Automatically pause/un-pause CodeKit File-Watching when BBEdit loses/gains focus

Notifications You must be signed in to change notification settings

rmhall/bbedit-autopause-codekit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

================================================================================ bbedit-autopause-codekit

Automatically pause/un-pause CodeKit File-Watching when BBEdit loses/gains focus

Author: Robert M. Hall - http://www.impossibilities.com/

I am a big fan of CodeKit, BBEdit and Sublime Text. There is a nice plugin for Sublime Text to control pausing/unpausing the File-Watching behaviour of CodeKit when Sublime Text loses/gains focus (among other things) - so I re-created the core pause/unpause File-Watching functionality of CodeKit specifically for BBEdit.

Two scripts included, source and compiled versions.

  1. A plain-text version (.applescript)
  2. A compiled version (.scpt)

The plain text version is available in the src folder for editing.

BBEdit requires the compiled versions to function. Use Mac OS X built in script editor to open the source AppleScript and compile them if you need to make changes, or if you already have applicationDidSwitchIn and/or applicationWillSwitchOut applescripts in place, you can add the code from these to your existing Attachment Script hooks.

Additional reference for Attachment Scripts: In the current BBEdit Manual for 11.1.3 on page 290: https://s3.amazonaws.com/BBSW-download/BBEdit_11.1.3_User_Manual.pdf and http://bbeditextras.org/wiki/index.php?title=Attachment_Points

To enable the scripts/functionality, place the two compiled .scpt files in the BBEDIT, Attachment Scripts folder.

Location:

/Users/your_username/Library/Application Support/BBEdit/Attachment Scripts/

Once the scripts are installed, BBEdit will automatically pause CodeKit File-Watching when it loses focus, and un-pause CodeKit when BBEdit regains focus.

NOTES:

  1. If the Attachment Scripts folder doesn't exist already, you must create it.
  2. Naming is important for the application hooks - don't rename the files.
  3. Right now there is no toggling of this feature, simply move the scripts out of the folder if you want to disable them. May add some sort of toggle in the future.
  4. I may get around to replicating some of the other functionality for BBEdit in these scripts, that the Sublime Text plugin offers for controling CodeKit. If you do it first, please make a pull request! 😃

Enjoy!

About

Automatically pause/un-pause CodeKit File-Watching when BBEdit loses/gains focus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published