Quick Tip: Trick Out Your Mac with Terminal

Quick Tip: Trick Out Your Mac with Terminal

Tutorial Details
  • Topics: Terminal, Command Line
  • Difficulty: Intermediate
  • Estimated Completion Time: 10 Minutes
This entry is part 3 of 10 in the Taming The Terminal Session
« PreviousNext »

The Mac OS X operating system is already really sleek, but we’re going to look at how to use terminal to activate some cool hidden settings that will make your Mac even better. The terminal tricks I’ll be showing you range from adding spaces to your dock to freeing your Dashboard widgets from the Dashboard. So let’s get started!

Note: These Terminal commands have all been tested on Snow Leopard and should run just fine on Lion and Mountain Lion.

 


Drag Dashboard Widgets onto your Desktop

Dashboard Widgets on the Desktop
Dashboard Widgets on the Desktop

This is probably my favorite Terminal trick. With the code below, you can move any Dashboard Widget from Dashboard to your desktop. Just click on and hold the widget, then hit F4 to exit Dashboard and release. Your widget will be on the desktop for your convenience, this is great for to-do lists or weather widgets!

defaults write com.apple.dashboard devmode YES

You will have to log out for this to have a effect, if you decide you want to switch back, simply replace YES with NO. In fact, replacing YES with NO works for just about any Terminal command that has a YES or NO at the end of it.


Make Hidden Dock Apps Appear Transparent


Hidden dock apps become transparent

This Terminal command will make apps that you’ve hidden have a transparent icon in the Dock. This is useful since you don’t have to right click them to find out if they are still hidden or not. You can now just take a quick glance at your dock to find out!

defaults write com.apple.Dock showhidden -bool YES

Press enter, then type:

killall Dock

Press enter again, your dock will hide itself and come back, and that’s it! Hidden apps are now transparent in your dock! Again, you can switch back by replacing YES with NO.


Add Spaces to your Dock


Add Spaces to your Dock

Adding spaces to your Dock is a great way to organize your apps. To get started, type or paste the following code into Terminal:

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'

Press enter, now type:

killall Dock

Your Dock will come back up with a empty space in it. You can treat this just like any app, click and drag to move it around, or drag it out of the dock to remove it. Do the command as many times as you need to for more dock spaces.


Change the Format for Screenshots

If you’re like me, you probably find it annoying that when you take a screenshot with Grab, you have to use a program like Adobe Photoshop to convert it to a jpg for web use. Well hold on, because terminal has a fix for this too! Here is the code you need:

defaults write com.apple.screencapture type jpg

You will need to log out for this to have an effect. Once you have logged back in, Grab will take screenshots in jpg format.

Tip: You can replace “jpg” with a few different formats, such as “png” or “tiff”.


See The Contents of a Folder with QuickLook


See The Contents of a Folder with QuickLook

When you normally use Quicklook, it will just show you the folder icon, the total amount of memory the folder is taking up, and the amount of items inside that folder. With this Terminal trick, the folder icon will also show previews of the contents of itself!

defaults write com.apple.finder QLEnableXRayFolders -boolean YES

Wait a few seconds, then open and close a folder using Quicklook (press spacebar when a folder is selected). It will x-ray the folder to show its contents!


Conclusion

I hope you enjoyed these Terminal commands, each of which allows you to add a little bit of customization to your Mac.

These were just a few of my favorite Terminal tricks, Please feel free to share your favorite tips and tricks below in the comments!

Nick Pavlovits is Glutenfree4u on Photodune
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://pointerway.com/ curtis prather

    i dont have problem with screenshot image format, but do you have a code to change size of screenshot image result ? i want screenshot image result more smaller,

    • Nick Pavlovits
      Author

      The size of the screenshot will all depend on how big an area you select if you are using the selection option, otherwise it will just be the size of your window or screen, I don’t know of any way to change that.

  • Jake

    I can’t seem to get the “See The Contents of a Folder with QuickLook” trick to work. I am using Mountain Lion, and I even restarted my computer after applying via Terminal.

    • Robert

      Try
      defaults write com.apple.finder QLEnableXRayFolders 1
      Restart Finder
      Doesn’t seem to work on 10.7.* …

      • Jake

        That didn’t seem to work either. I wish I could get it to because I’ve been wanting that feature forever in Quick Look.

    • Kevin Lorenz

      Same here on MTLion 10.8.2.

  • Josh

    The dashboard widget mod doesn’t seem to work for me…
    Running Mountain Lion on MbpR.

  • http://twitter.com/dunndunndunn dunndunndunn

    https://github.com/mathiasbynens/dotfiles/blob/master/.osx is a huge selection of defaults commands.

  • asf

    none of the images are showing up

    • Nick Pavlovits
      Author

      They are all showing up for me, Do you have a flash blocker or other internet blocking plug-in installed? try temperaroily turning it off.

      • http://www.facebook.com/amccabe Alex McCabe

        Definitely still not working

      • http://www.facebook.com/manu.lorenzo Manu Lorenzo

        They still don’t work for me either

  • Beny

    Images can’t be displayed because they are in TIFF format… Wtf do you use this format for web ?

  • http://www.facebook.com/gerbyzation Gerben Neven

    I can’t get get the dock items to appear transparent when hidden, even after a reboot. Running 10.8.2

    • http://www.facebook.com/gerbyzation Gerben Neven

      any help on this?

      • Guest

        same probelem

  • person

    The trick with widgets on the desktop doesn’t work with mountain lion

  • person

    why would people even use grab? just press shift+comand+4 or Shift+Command+3. it is much easier and faster.

  • Josh

    I can’t get Drag Dashboard widgets onto your desktop to work. They just disappear. I am using mointain lion