Extending Shuriken
February 8th, 2009
This is the first of a series of articles, I am planning to write explaining how to create your own modules for extending Shuriken. In this article, the hello world is implemented for Shuriken.
Shuriken is an application launcher that is trying to bring you the power and flexibility of the famous Quicksilver on OSX. It is developed in .NET and C#, but you can use any .NET language to develop your own module. All you will need is Visual Studio 2008 any Express Edition or better.
Setting up your project
The first thing is download the latest release of Shuriken from Shuriken project site on Codeplex.com and unzip it. Run it and notice that a plugin folder is created in your installation directory.
Next is to fire up Visual Studio.NET 2008 and create Class Library project.
The next is to add the Shuriken.Base.dll as a reference to your project. This dll can be found next to your Shuriken.exe and contains all the interfaces and classes that you will need to use to write your own modules.
After adding the reference your project structure should look like this.
Subjects and Actions
There are two main concepts in Shuriken, the Subject and the Action. A Subject is normally on the first pane and this is the Notepad on the picture. The Action is the second pane on the UI and in this case the Reveal action. After pressing enter the Reveal action will show the location of the Notepad subject.
When you write modules then you most of the time creating subjects and actions. Let’s start with the action. All we need to create a new class and implement the ISubject interface from the Shuriken.Base namespace.
1: using System;
2: using Shuriken.Base;
3:
4: namespace HelloWorldSubject
5: {
6: public class HelloWorldSubject : Shuriken.Base.ISubject
7: {
8: #region ISubject Members
9:
10: public System.Collections.Generic.List<IAction> GetListOfActions()
11: {
12: return new System.Collections.Generic.List<IAction>();
13: }
14:
15: #endregion
16:
17: #region IObject Members
18:
19: public string Description
20: {
21: get { return "First Shuriken plugin ever"; }
22: }
23:
24: public string Icon
25: {
26: get
27: {
28: return string.Empty;
29: }
30: set
31: {
32:
33: }
34: }
35:
36: public string Name
37: {
38: get { return "Hello World!"; }
39: }
40:
41: #endregion
42: }
43: }
There are couple of methods you will need to implement in your class. The first is called GetListOfActions which needs to be only returning an empty list for now.
The Description property is returning a string that is going to be the description for our subject. The Name property is going to be the name of this subject and the Icon will be the icon displayed. In the code I gave Hello World as the name and left the Icon property to be and empty.
To have something meaningful happening to our subject an action is needed as well.
1: [DefaultAction]
2: [ActionName("Say It")]
3: public class HelloWorldAction : Shuriken.Base.BaseAction
4: {
5: public override bool CanExecuteOn(ISubject subject)
6: {
7: if (subject.Name.Equals("Hello World!"))
8: {
9: return true;
10: }
11:
12: return false;
13: }
14:
15: public override void Execute(ISubject subject)
16: {
17: System.Windows.Forms.MessageBox.Show("Hello World!");
18: }
19: }
The HelloWorldAction is created by either implementing the IAction interface or extending the BaseAction class. I did the later for simplicity sake. Extending the BaseAction class is simpler and can be done with attributes as well. There are two attributes used DefaultAction and ActionName.
DefaultAction will tell Shuriken that this is the default action for the a subject, meaning that this will be the first action always. ActionName will be the name of the action.
There are also two methods that we need to implement. The first method is called CanExecuteOn and it tells us, if the subject is supported by this action. The second method is called Execute and it is called when the user hits enter and the action is called.
After finishing the two class, you will need to compile the project and drop the HelloWorldSubject.dll to the plugin folder and restart Shuriken. Then invoke the UI and start typing Hello World…. after hitting enter you should end up with the Hello World! dialog box displaying.
Shuriken is an application launcher utility, that is developed by me in my free time. It is open source and free. If you would like to download Shuriken or help to develop it, please visit Shuriken on codeplex.
http://www.codeplex.com/shuriken
Popularity: 25% [?]
Shuriken tips #1: Locating Notepad on your computer
February 5th, 2009
This is the first article of many showing the functionality of the application launcher I am working on.
Sometimes you need to know the location of an application on the file system. Shuriken makes this easy for you to achieve really quickly. Let’s locate Notepad on your computer. All you need to do is to bring up shuriken using Ctrl-Space or the hotkey to bring up Shuriken and type Notepad, then tab to the action pane and type Reveal. Hit Enter and the location of Notepad is revealed.
and it is going to show the result the location of notepad on your computer
Shuriken is an application launcher utility, that is developed in my free time. It is open source and free. If you would like to download Shuriken or help to develop it, please visit Shuriken on codeplex.
http://www.codeplex.com/shuriken
Popularity: 29% [?]
Some very nice icon tutorials
January 11th, 2009
I am trying to learn how to make some vector art stuff and icons on my own. I am always on the look for nice tutorials. The icons I like the most are stylized illustrations of different things that we use everyday such as a compass or pencil. I though I would list my favorites:

Design a Detailed Compass Icon in Photoshop
Very nice compass icon done in Photoshop. I like it, because of the metal part and the reflections on the compass glass and body and the attention to details.
Another drawing tutorial for icon lovers in which we’ll be illustrating a metallic compass. We’ll be controlling shadow and reflection to add realism to the illustration. As with any icon design, it’s a combination of the overall design and subtle details that gives quality results.
Create a Custom Mac OSX Style Ring Binder Address Book Icon
Mac OS like address book, again lot of attention to the details.
Today I’ll show you how to create an Address Book replacement icon for Mac OSX. When you are a beginner, it’s better to start with designing replacement icons to get some practice. Let’s get started with personalizing the icons in our workspaces.

Design a Shiny Photorealistic Apple Remote
Apple has so many beautiful products. Their product designs consistently attain a sought-after status, which distinguishes them as an innovative company. In this tutorial, I’ll teach you how to make a shiny new apple remote.
Some extra string comes here and so the layout will be much better …..
![]()
Create a Shiny Lock Icon Design
The gloss and reflection is very nicely done on this lock icon.
A popular icon that you can find on the internet is the lock icon. It is widely used to identify secure Web pages.
It often indicates password fields for secure files. Wherever you wish to place a lock icon, this tutorial will show you how to create an attractive one for you to use.
How to Create a Super Shiny Pencil Icon
This is another cool looking icon, my only complaint with this is that the top part of the pencil does not look like an actual eraser, but I guess this can be fixed by changing the color and removing the reflection.
The Pencil is one of the visual metaphors most used to express creativity. In this tutorial, I’ll show you how to draw a pencil icon. We’ll have a look at gradients, selection tools, and basic transform operations. Let’s have some fun with this.

How to Make a Bangin’ Woofer Embedded in Wood
In this tutorial, we’ll illustrate a woofer and make a simple wood texture for the background. We’ll place the speaker so that it appears to be inside the wood texture. Also, we’ll create screws that appear to hold it in place. Put some good music on and lets get working!
Illustrating a Cool Glass of Beer
In this tutorial, we’re going to draw a beer glass with some beer in it. We’ll create the shiny curly glass with reflection, put some beer in it, add some bubbles, and finally we’ll make the shadow and the reflections. Meanwhile, I hope you’ll have some fun and learn some cool techniques too.
I try to collect more of these tutorials in the future and post them as I have them. If you know some, please share with me….
Popularity: 23% [?]
