[TxMt] Textmate widget & bundle

Andy Herbert andy.herbert at gmail.com
Sun Oct 22 17:11:01 UTC 2006


On 22 Oct 2006, at 14:15, thomas Aylott wrote:

> On Oct 22, 2006, at 8:18 AM, Andy Herbert wrote:
>
>> I've been trying to come up with a solution to creating shell  
>> scripts within Textmate and creating a widget on the Dashboard  
>> layer to call the script with references to any files or URLs  
>> passed to it, and I have eventually come up with a Textmate widget  
>> & bundle to do all this.
>>
>> The widget bundle can be found at:
>>
>> http://homepage.mac.com/andy.herbert/Widget.tmbundle.zip
>>
>> I hope it might be useful to someone else on this list.
>
> I want to use existing scripts that already have names and stuff  
> without being deleted when closing the widget.
> Can you make it link to existing scripts easily?
>
> Link open document into new widget
> and then change the existing one to:
> Copy open document into new widget

Thanks for that suggestion, I did wonder whether to have an option to  
call scripts directly which weren't saved for the purpose of the  
widget, but I figured that would cause all sort of problems handling  
error reporting, something which I didn't want to deal with in the  
limited UI of a dashboard widget.

Despite this I've included a new option in the bundle to "Call  
Document in New Widget" which basically creates a new script used by  
the widget which calls whatever $TM_FILENAME is and also passes any  
arguments to it, this way if you move, delete, or rename the script  
it calls it's reported in the log generated by the widget. The label  
given to the widget is also the original filename of the script it  
links to, so it might help save you some time. Since I've made some  
changes to the widget to do this, I'd recommend manually deleting the  
widget in ~/Library/Widgets/ (or use the widget manager), and select  
the new "Install Widget" option in the bundle to update it.

Thanks for the positive feedback.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20061022/089a3866/attachment.html>


More information about the textmate mailing list