February 2021 (version 1.6.9) - Built-in Editor, New Main Menu Features, `await path()`, Event handlers, Beta pro features, Terminate Process
Been a busy month of major Script Kit features!
Built-in Editor
Script Kit's number one goal is to make writing time-saving scripts easier. So now Script KIt comes with a pre-configured editor, complete with autocompletion and error checking:
If you're already using vs code, you can switch to the "Kit" editor in the Kit
tab -> Change Editor
.
Main Menu Shortcuts and /
, ~
, and >
The Script Kit main menu will continue to grow in features.
Shortcuts
cmd+f
- Does agrep
search through all of your scriptscmd+p
- Launches aProcesses
menu for currently running scripts
Path Mode
Type the following characters to change the mode of the main menu:
- ~ Switches to a path selector mode in your home directory
- / Switches to a path selector mode in your root directory
Navigate with right/left or tab/shift+tab then select with return. Here's an example of typing ~
Command Mode
- > Switches to a command mode to execute a command
Future Work
In the March release, planning on these:
- , List system preferences
- . App launcher
- ; MEGA MENU WITH EVERYTHING ðŸ¤
await path()
You can now prompt to select a path. This UI works exactly like "path mode" above.
Event Handlers
When building the path
prompt, I realized it just wasn't possible to do in a script. So I put in the effort to expose the event handlers from the app into the prompt. So even though path
behaves very differently, it's still an arg
with customized handlers. You can override many of the handlers yourself for customized prompts:
For example, you can override the default behavior of Escape
terminating your current script:
Overriding handlers is definitely considered "advanced", so I'm happy to answer any questions!
Here's a list of all the new arg
config properties:
onInputSubmit, onShortcutSubmit
If you want to create "shortcuts" to submit specific values, can use the new onInputSubmit
and onShortcutSubmit
. These allow you to bind text or shortcuts to submit values. This is exactly how the main menu works:
Beta Pro Features: Menubar
You can now customize the text of the Script Kit menubar icon to say anything with the pro.beta.menubar
method. In the future, you'll be able to build out an entire menu, but I thought I'd sneak this feature in for fun in this build:
Open menubar-demo in Script Kit
Terminate Processes
If you need to end a script that's running in the background, stuck on an exec command, or whatever reason, open the main menu with the cmd+; shortcut, then press this button (or hit cmd+p. This will open a "terminate processes" window where you can end your scripts: