Black Mac OS X is a free, open-source SIMBL plugin created by Alex Zielenski. In a finished state it will provide a complete Mac OS X Snow Leopard theme and hopefully 10.7 Lion. Shades of Gray for Snow Leopard looks good with this window theme.
You can download the built version here
There is no formal documentation to the code as of now (and probably, there never will be) but most of the code is documented with in-line comments.
It builds as a SIMBL plugin; so to use, just build and put the plugin in “~/Library/Application Support/SIMBL/Plugins”
I included an application (Framework Dumper) that gets class headers for cocoa frameworks and puts them into a directory. Use it to find hidden methods to override.
The layout of the documents should be self-explanatory, if not. Here is a quick run through:
1. There is a root plugin class, BMXController.h which is in charge of initializing the plugin, starting the swizzling of all the methods, and basically just getting things going.
A. If you are unfamiliar with what swizzling is, it is used to replace another class’s methods with your own.
B. I use JRSwizzle to swizzle everything in here.
2. All the swizzled methods follow the same pattern, the new one gets a new_ as a prefix and you have to create an alias for the old one using an orig_ prefix to be able to call it within you’re category.
3. To swizzle an entirely different class (like NSTableView) so you can change the selection gradient. First, create a category to NSTableView:
@interface NSTableView (BMXTableView)
- (void)new_overriddenMethod;
@end
…
@implementation NSTableView (BMXTableView)
- (void)new_overriddenMethod {
[self orig_overriddenMethod]; // Call the original method (if needed)
[self setColor:[NSColor greenColor]]; // Do what you need to do.
}
4. Don’t forget to import the category you create into BMXController and called -swizzle and add this code into the swizzle method of your category!
#import “BMXTableView.h”
…
[NSTableView jr_aliasMethod:selector(overriddenMethod) // Create an alias so we can call it from our category withSelector:
selector(orig_overriddenMethod)
error:&err];
NSLog("%
“, err);
[NSTableView jr_swizzleMethod:selector(overriddenMethod) // Replace the original implementation with your own. withMethod:
selector(new_overriddenMethod)
error:&err];
NSLog(@”%@", err); // We love to log errors!
…
5. If you create some of your own useful features, send me an e-mail at alex[at]alexzielenski[dot]com and I’ll try to add it in!
- iChat not-logged-in window not fully themed
Bottom of finder window has unreadable textFixed!Toolbars have unreadable textFixed!- Finder isn’t themed on initial login.
- Sometimes the Finder bottom bar isn’t white. (especially when selecting an object)
Toolbar buttons and such that have a background but are in the title bar or bottom bar have white text or images. (most noticeable in system preferences)Fixed!
- Customize NSButtons and such
- Custom source list sidebar
- Find a way to theme finder at login. (Maybe a login item that restarts it automatically?)
The Creative Commons Attribution-NonCommercial 3.0 Unported License applies to this work. All attribution goes to Alex Zielenski. Please do not use any of this code in commercial work without consent.
Thank You.