Perfect! Now I need to patch the binary and change the values. I’m pretty sure I’m done here, but one more check, just to make sure there is no mistake. Let’s use lldb to confirm the hypothesis. This pattern repeats four times, meaning that four colors are used to colorize a sticky note view. It looks like these are exactly the colors I am looking for. An interval between the values - 8 bytes, which perfectly fits into a double. The method accepts color components as doubles, where 0 corresponds to 0, and 1 corresponds to 255. I’m not 100% sure, but I’d assume that they are used to pass parameters into colorWithDeviceRed:green:blue:alpha. What is important here: three consecutive values starting at 0x10000c790 moved to xmm_ registers. If an index is zero, then the offset is zero as well. Then, based on this index some offset is calculated. It (almost) clearly shows what happens inside of setColorByIndex: method: The Hopper app has a beautiful feature: pseudo-code mode. Then I decided to look at the binary through the excellent Hopper app. Hm, what does it mean? Why can’t LLDB find the symbol? It looks like this method receives an index of a color from the menu. Shallow look at Stickies.h shows that class StickiesWindow has a method setColorByIndex. Instead of searching for other words hoping that I will find something useful I can ask class-dump for help.Ĭlass-dump Contents/MacOS/Stickies > Stickies.h
Search for “yellow” and other colors gives no results. Search for “blue” shows one hit colorWithDeviceRed:green:blue:alpha: that comes from AppKit’s NSColor class. Let’s see if I can find a method related to the colors. I usually use MachOView if I need to look into a binary. My attempt to find traces from UI has failed. It doesn’t help me to achieve the initial goal, but at least I know where to look at if I ever decide to change a menu. If I replace “Blue” with “Blur” and restart the app, then I see the change: The best thing one can do is to try find something. Unlikely that I can find something useful inside, but let’s see. Plutil -convert xml1 Contents/Resources/Base.lproj/MainMenu.nib One can use plutil to convert them into human-readable XML: I am particularly interested in Contents/Resources/English.lproj/Localizable.strings. Localizations are stored within the app’s bundle, at Contents/Resources folder.
If I can find the key, then I can get the place where it’s used. The names should be localized using some string as a key. I don’t know where to start, but I have an idea. I just need to find where exactly and change the values to ones I like more.
The task becomes easy since the six colors are hardcoded in the binary. But there are no preferences, and there is no way to use a color other than six predefined. However, the first thing I did when I run the app first time - I opened preferences attempting to change the colors of notes. This is exactly what I needed for making quick notes while watching lectures or during debug sessions. For example, if I want a black note, I can have one, but I won't be able to see the "title" of it.Īll in all, love the app and am very grateful to have it at my disposal.Recently I have discovered the nice Stickies app that comes along with OS X. Same thing with photos, I would rather have the photo be in more of a link format than expand the entire photo (or at least the option to change how this works) so that I could store multiple photos in one single note and just click on the one I want.įinally, the fact that I am unable to affect the color of the font when a note is minimized and the first line shows up in the title actually eliminates some of the functinoality of the different color options. I could use the sticky notes to declutter my desktop (which I already use it for in other ways). I would really like to be able to click on the document and have it open. Second, if I drag a word document into a note or paste it in, all I end up with is a useless thumbnail. Not a huge deal, but it would be nice if they would retain their position. I have to rearrange them every time I restart my computer. There're only a couple of things I would love to see addressed or implemented.įirst, when I restart my computer, many, if not all, of the notes I have saved on my desktop get moved and stack on one another. Even being able to change the "names" of the colors in a palette is a huge perk. I love the versatility and the customizable color palettes. I like this app a great deal, and I am extremely satisfied.