Home > Black-Mac-OS-X

Black-Mac-OS-X

Black-Mac-OS-X is a project mainly written in OBJECTIVE-C and C, it's free.

A SIMBL plugin to turn 10.6.x Snow Leopard into a black tub of awesomeness.

h1. Black Mac OS X

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":http://www.fif7y.com/themes-computers.html looks good with this window theme.

!http://kttns.org/hnjkz(Black Mac OS X in Gity using SOG Theme)!

You can download the built version "here":https://github.com/alexzielenski/Black-Mac-OS-X/blob/master/Black%20Mac%20OS%20X.bundle.zip?raw=true

h3. Documentation

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.

h3. Usage

It builds as a SIMBL plugin; so to use, just build and put the plugin in "~/Library/Application Support/SIMBL/Plugins"

h3. Adding Your Own Features

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: 

<pre>@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. }

    1. 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!
    …
    1. 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!

h3. Issues

iChat not-logged-in window not fully themed

-Bottom of finder window has unreadable text- Fixed!

-Toolbars have unreadable text- Fixed!

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!

h3. Todo

Customize NSButtons and such

Custom source list sidebar

Find a way to theme finder at login. (Maybe a login item that restarts it automatically?)

h3. License

The "Creative Commons Attribution-NonCommercial 3.0 Unported License":http://creativecommons.org/licenses/by-nc/3.0/ applies to this work. All attribution goes to "Alex Zielenski":http://alexzielenski.com. Please do not use any of this code in commercial work without consent.

Thank You.

Previous:pm87-caelum