General Mac tips

General Mac tips

Managing desktop

Use Expose to help access open windows: System Preferences…Dashboard & Expose.  I use the upper left corner of the screen to show all windows and the lower left corner to view desktop.

Keyboard shortcuts

<fn><delete> will do a forward delete
<fn><option><delete> deletes word to right of cursor
<Left Arrow>/<Right Arrow> to open/close folders in finder
Cmd+[, Cmd+] to move backward and forward in finder history
Cmd+<Up Arrow> to navigate up the folder hierarchy

Copy file path to clipboard

While in the right-click menu, hold down the OPTION key to reveal the “Copy (item name) as Pathname” option, it replaces the standard Copy option

How to Print Screen to a file on the desktop in Mac OS X

The basic functionality of taking a screen capture of a window or desktop in Mac OS X takes an image and dumps it to a file on the Mac desktop. Each uses the pressing of Command and Shift keys concurrently as the basis for execution, followed by a number:

  • Command+Shift+3: takes a screenshot of the full screen (or screens if multiple monitors), and save it as a file to the desktop
  • Command+Shift+4: brings up a selection box so you can specify an area to take a screenshot of, then save it as a file to the desktop
  • Command+Shift+4, then spacebar, then click a window: takes a screenshot of a window only and saves it as a file to the desktop

How to Print Screen to the Clipboard on a Mac

This functions a lot more like Print Screen in the Windows world. If you want to do the equivalent of Print Screen to the clipboard so that you can paste it into another app, these are the commands you’d want to use:

  • Command+Control+Shift+3: take a screenshot of the entire screen (screens if multiple monitors), and saves it to the clipboard for pasting elsewhere
  • Command+Control+Shift+4, then select an area: takes a screenshot of selection and saves it to the clipboard for pasting elsewhere
  • Command+Control+Shift+4, then space, then click a window: takes a screenshot of a window and saves it to the clipboard for pasting

Copy files skipping files that exist

Normally you are only giving the choice to Replace/Stop/Keep Both By  holding down the <Option> key when you drag and drop, Replace is “replaced” by Skip

Move Files in Finder

Command + C
Command + Options + V (Command + V will Copy)

Change default location for screenshots

  • Create new folder in finder.
  • Open up terminal and type in:  defaults write com.apple.screencapture location
  • Making sure there is a space after “location”, drag the folder you created to the terminal window to append the folder path
  • Hit Enter
  • Type killall SystemUIServer and hit enter

Show hidden files

Since the release of macOS Sierra, when in Finder, it is now possible to use the shortcut:

 CMD + SHIFT + .

Press once to show hidden files and again to hide them.

Merge folders copying only if file doesn’t exist
rsync -av –ignore-existing /source/folder/ /destination/folder/

XCode Project Window Layouts

XCode Project Window Layouts

It took me a while to find this so I’m posting it so I don’t forget.  Before I got my MacBook I was using a Mac Pro workstation with XCode already installed.  It had a control in the toolbar titled "Page" with three options: Project, Build, and Debug.

When I installed XCode on my MacBook I lost the ability to switch between layouts.  One of the things I don’t like working with XCode is how so many windows end up being displayed and the difficulty in finding and switching between them.  The problem is exacerbated by the fact the MIB Editor is a separate program which is not integrated with the XCode environment.  It’s too bad this All-In-One layout isn’t used by default, I may not have had such a bad first impression of the XCode UI.

I finally found how to restore my preferred 3-layout mode.  Simply select All-In-One Layout in the General tab of the XCode Preferences.  BTW, I searched using Google for "Customizing page control in XCode" to find this Apple documentation.  I had found in the View menu "Show Page Control" which gave me a clue but the default page control only gives you Project & Morph.  I though it odd that a control that has it’s own menu item, and that can contain different items, couldn’t be customized on it’s own.

What I don’t like about my new MacBook Pro

What I don’t like about my new MacBook Pro

Not much, but since I’m being real:

I prefer to use an attached mouse when I’m working at the office.  An inexpensive USB optical 3 button mouse with a scroll wheel will do nicely.  Please, no 1-button Apple mice.  The convenience of a right button for context menus, and scrollwheel for scrolling can’t be beat.

My workarea arrangement has just enough space for a mousepad to the right of the MacBook.  I also must have a second screen attached.  I don’t like the connections along the right side of the MacBook.  Attaching the DVI/VGA connector interferes with my placement of the mousepad and use of a mouse.  I actually attach the mouse to the USB port on the left side and bring it around the back to the right side.  The ethernet port is on the right side too which also gets in the way.  If the connections could have been placed in the back, all cabling would have been hidden and would have allowed for more work space.

That’s basically it. Certainly a lot more to like than not like.

Cocoa Development Book Recommendations

Cocoa Development Book Recommendations

I received a nice reading list recommendation via email in response to this first post on Mac Development.  Here is the recommendation:

Kochan’s, "Objective C" is a great book. On the other hand, Garfinkle and Mahoney is very much out of date to the point that many in the community are upset that O’Reilly still sells the book without a caveat. The Cocoa they were writing about is circa 2000 or 2001. A great deal, mainly from Tiger and even Jaguar, has changed since then.

A better book would be Aaron Hillegass’, "Cocoa Programming for Mac OS X", 2nd ed. Aaron’s book is based on his Cocoa Bootcamp, an intense week of A-Z in Cocoa programming. Although a bit long in the tooth, though not as much as G & M, Anguish and Yacktman’s, "Cocoa Programming" is a great tome for filling in
the details that Aaron may gloss over. And no book recommendation would be worth much without mentioning, "Cocoa Recipies for OS X’ by Cheeseman.

Also recommended by a friend: Advanced Mac OSX Programming – by Mark Dalrymple

MacBook Pro first impresssions

MacBook Pro first impresssions

Yesterday I received my new PowerBook Pro.  It is a $2000 laptop running a 2.2GHz Intel Core 2 Duo.  It comes with a 120Gig HD, 15in wide screen (up to 1440×900), SuperDrive (DVD burning), Firewire 400 & 800 ports and a built in iSight camera.

There is a program called Photo Booth that uses the camera and allows you to capture photos and apply morphing effects.  It was a big hit with my kids.

David

The keyboard automatically illuminates via light shining from underneath the keyboard.  It is the bomb!  I had my whole family in the kitchen pantry showing off this feature.

The built-in iSight camera is so tiny (2 centimeters square) that I didn’t even notice it on the frame of the screen until I ran Photo Booth and saw the real time capture of myself in the window.  It is the bomb #2!

I had seen it before, but if you’ve never experienced the power chord for a MacBook, that would be the bomb #3!  The power cord attaches magnetically to allow it to disconnect quickly if the chord is tripped over.

I’m not still completely sold on the Mac interface (there are things I like and things I don’t like), especially in terms of it being far superior to Windows, but I am definitely sold on Apple’s latest hardware and the first-time experience of using a Mac.

Update Aug 6, 2007:

I like the fact that the power cord has an extension.  You can plugin without it or with it.  That means that I can keep the extension plugged into my power strip at work and keep the optional prong attachment in my briefcase (or at home).   To pack for home It’s easier to just disconnect the extension and take the power cord with me. A small convenience but worth mentioning.

Software Development on the Mac

Software Development on the Mac

I'm starting some mac development. I'm reading "Programming in Objective-C" by Stephen Kochan. I also have "Cocoa Applications" by Simson Garfinkel & Michael Mahoney.

One way I justified buying a Mac Mini for Jane was the possibility of being able to do Mac development on it. It comes with all the development tools necessary. So hear I am.

I'll keep a log of my experience as a first time developer on OS X and post the most interesting comments on my blog.

GUI development on the mac vs the PC