hackinations

Latest

  • Hackinations: That Firefox full-screen thing

    by 
    Erica Sadun
    Erica Sadun
    08.15.2011

    Got dual monitors? Have Firefox installed? Go ahead an open a browser window and then do this. Either click F11 or choose View > Full Screen (Command-Shift-F). Firefox then does something that Lion users have been clamoring for. It creates a Lion-style full-screen presentation, complete with the double-arrowed OS X-standard restore button. And it does this only on one screen. (Update: It has hover-to-reveal of the restore button, which doesn't seem to be a custom behavior.) I'm dying to know how. All the other apps that support full-screen use the standard zoom item built into their windows. I showed you how to add that feature to non-full-screen apps in a recent Hackinations post. But the standard zoom goes across all windows, not just on one. How is Firefox doing it? I don't know and I'd like to find out how. And, more importantly, I'd like to find out how to add it on an app-by-app basis or enable it system-wide. Got a theory? Know something about this? Drop a comment!

  • Hackinations: How to bring the spring back into TextEdit's step

    by 
    Erica Sadun
    Erica Sadun
    08.01.2011

    TextEdit on Lion has version control coming out of its ears, vertical layout for Eastern languages, and improved toolbars. It's got some really great forward-looking features. It also is slow as a hungover mule carrying ten sacks of potatoes. Launching the file open dialog takes countable seconds. It's no longer instant the way it used to be. And losing that responsiveness has been getting on my nerves more and more the past few weeks. Today, I finally had enough of Lion's TextEdit. I replaced it with Snow Leopard's. I keep an entire SL install around on a spare USB drive. (/Volumes/Backed was my last Carbon Copy Cloner backup, made as I was about to switch to my new SSD HDD.) I launched my copy off that backup. Now that I've been using it, I'm not sure if I'm going back anytime soon. When you open a lot of files throughout the day, searching for items, making updates in to-do lists, and so forth, that re-found zippiness is incredibly welcome. I'm no longer plagued by "Could not create file" errors, or slow-loading screens with their pause-pause-pause delays. Find and replace has returned to the uglier but faster floating panel from the built-in version, and "replace" is back to being a standard element rather than an option. Returning to 10.6 TextEdit is like putting that mule on methamphetamines. Speed, I tell you, speed. I'm going to give this about a week and see how things go before I make a more permanent commitment. For now, I've remapped my Quickeys macros to open the SL version rather than the Lion one, but I haven't changed anything else in-system. Are you a heavy TextEdit user? How has the change to Lion affected your workflow. Pipe up in the comments. And for all of you who are about to comment "If you hate Lion so much why not go back to Snow Leopard," well get off of my lawn, you rotten kids. I love Lion, but I'm not afraid to keep making it better.

  • Hackinations: Figuring out "Duplicate Exactly"

    by 
    Erica Sadun
    Erica Sadun
    07.27.2011

    Today, the TUAW backchannels were having a fine old time exploring all the new options built into Finder. Most of the features are pretty obvious in what they do. For example, hold down the Shift key while opening the Go menu to discover the Select Startup Disk on Desktop option. Hold down the Option key to force the Library folder to appear. Pretty straightforward, right? So what was option shown below all about? In Finder, when you select a file and view Option-Shift-File Menu, about halfway down the menu is a curious choice. Duplicate exactly. It took quite a bit of work to track down what it did. Whatever it was, it required you to authenticate as an administrator to use it. At first, the TUAW hive mind thought it might have something to do with copying pre-existing versions along with files. So we created a simple file and started versioning it. Then we duplicated it and duplicated it exactly. In neither case did the version information transfer. So then we turned to Dtrace at the suggestion of @rylin on Twitter. It turns out that although the duplicate option is executed by Finder, the duplicate exactly version uses Locum to perform file writes. If you're not familiar with Locum, it's a built-in part of OS X (has been around for a few years) that handles privilege escalation. You use it whenever you try to delete items that are owned by other users or by the system. That led to some new tests. While we had originally discounted Emanuele Vulcano's hypothesis that the option "kept permissions intact", his guess was far more right than wrong. Simple duplication did retain permissions in our tests, just as they did with duplicate exactly. What we didn't find out for a while is that duplicate exactly also retains file ownership, in addition to permissions. We went ahead and created two files at the command line. We used chown to change the owner of the first file to root. Then we went ahead and used first duplicate and then duplicate exactly from the finder on both these files. The copy version for each file is from duplicate, and the copy 2 version from duplicate exactly. What you can see here is this. While the permissions remain for each copy, what changed was the owner. A simple copy of foo changed the ownership from root to me. An exact copy using the authenticated Locum process preserved the ownership as well. There you have it. One mystery solved.

  • Hackinations: 5 really good Lion tweaks

    by 
    Erica Sadun
    Erica Sadun
    07.26.2011

    Lion. We love the OS. We hate a few tiny details. Here are five extremely handy Lion tweaks that can improve your day-to-day use. Enable each by typing the supplied commands into Terminal. 1. Turn off those #*%(ing zooming windows Launch Safari or TextEdit and then hit Command-N a few times. Do you see how the new windows fly or "zoom" into place? You can disable that with this elegant tweak from TUAW reader Ryan Hauk. First, open Terminal and type the following: defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO Finally, quit and restart whatever app you're looking to de-zoomify. You do not have to set the defaults more than once, but the apps won't pick up the new setting until their next launch. 2. Enable key autorepeat. You won't be able to use those cool iOS-inspired, press-hold-and-select-an-accented-character feature, but you'll get back thissssssssssssssssss. Courtesy of belchak.com. defaults write -g ApplePressAndHoldEnabled -bool false Interestingly, you can set this preference on a per-application basis. So you can enable key-repeat for, say, TextEdit but not for Safari by using e.g. com.apple.TextEdit instead of the global domain. 3. Make your ~/Library folder visible. This removes its hidden flag, so you don't have to keep using the option-key from the Finder's Go menu. chflags nohidden ~/Library/ 4. Disable spelling correction. When you want to be able to refer to "nethack" or "Megs" without it being autocorrected to "netback" and "Mess," you can turn this off from the command line -- or, if you prefer, get somewhat more granular control in the Text section of the Language & Text system preference pane (uncheck 'Correct spelling automatically'). defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool NO 5. Mandate scrollbars. Let scrollbars become a permanent part of your windowing experience. defaults write -g AppleShowScrollBars -string Always And 6. Add back the Finder's size information. (Via TUAW reader 1TallTXn) Open a Finder Window and use Command-/. Presto And 7. Disable mail animations. Chris Pirillo sent me link to his how-to write-up, which uses this command (discovered by "Adrian") to simplify visuals when replying in Mail. defaults write com.apple.Mail DisableReplyAnimations -bool YES Have you found more good prefs? Let us know in the comments! Some good places to check are the Preferences folders (global and local), the HIToolbox, and Core Services. Update: A reader pinged me to ask if I had come across any prefs that I didn't include because I wasn't sure what they did. Yes. Yes, I did. Here are a few for you to mull on: AppleUseCoreUI, AppleMagnifiedMode, AppleMenuSwipeDrivesMenuBar, and AppleUseSharedMenuBar. There are lots more like these in HIToolbox. Update: I'm asked if there's a way to disable autosave. I believe you have to set a default for NSDocumentAutosaveOldDocumentDayThreshold, which will probably only autosave beyond a certain time threshold. If you can confirm or test, please ping me at erica at tuaw.

  • Hackinations: Making any OS X app full-screenable in Lion

    by 
    Erica Sadun
    Erica Sadun
    07.25.2011

    Today, Steve Sande begged me to add a full-screen button to Colloquy. He offered me chocolate and kittens, neither of which is particularly good for me. But he's a good guy and I like him and his wife so I went ahead and figured this out. [Editor's note: Actually, she was offered chocolate-covered kittens, not chocolate and kittens.] I am so warning you: if you are not comfortable at the command line, just skip on to the next post. Seriously. Still here? Let's go then. Copy the App You probably don't want to edit the original, so copy the app to the Desktop. Locate the compiled nib files Compiled nib files can be found in the app bundle's Contents/Resources folder. In more internationalized apps, they may appear in lproj subfolders. You need to locate the nib files you want to edit. cd whatever.app/Contents/Resources grep -iRl NSWindowBacking * This returns a list of all nib files which define the NSWindowBacking key. That key more or less tells you that there's a window definition there. You can try to edit them all, or you can do what I did: just edited the three files in Colloquy's Resources folder that matched: JVChatWindow.nib, JVTabbedChatWindow.nib, and JVSidebarChatWindow.nib. Convert to XML Use Apple's plutil or my plusutil to convert each nib file from a binary property list to proper XML. plutil -convert XML1 filename.nib Edit those XML files Once converted, open the now text-based XML files in TextEdit. Search for the NSWindowBacking key/value pair in each file. After that pair add <key>NSWindowCollectionBehavior</key> <integer>128</integer> This tells the window that its behavior includes full size resizing. Save your changes and close the file. Convert back to BPlist Convert your edited files back to a binary plist. Strictly speaking? This isn't a necessary step. It just pleases me aesthetically. plutil -convert binary1 filename.nib Run it With luck, your app now has full screen zooming support. Enjoy it. Make sure to back up the original app before replacing it with your edited version. And do not expect to upgrade this version, like, you know, ever. UPDATE: If you don't mind installing SIMBL, a system level bundle loader, you can check out chpwn's well-received maximizer app as well. SIMBL allows you to enhance existing applications with new functionality and features.