Mac OSX Tips
Updated: February 10, 2010
Scripts
Here are a couple of useful scripts for OSX Snow Leopard:
Change the minimum font size in OSX mail (useful if you get HTML mail from Outlook 2003 users with text that look too small):
defaults write com.apple.mail MinimumHTMLFontSize 12
Force sub-pixel antialias in OSX to always on (OSX sometimes thinks that some newer LCD monitors do not support “LCD Font Smoothing” – using the trick below will force it to be always on like in OSX 10.5 Leopard):
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2
Week numbers into iCal / iPhone
If you are using iCal or an iPhone you are probably aware that you can subscribe to various calendars on the web such as national holiday events. One thing missing though is the functionality to show week numbers in the calendar.
Since I use week numbers regularly in my work I need week numbers in my calendar, so I modified a script from MacOSXHints that will create week numbers that can be imported into iCal. What my script does is that it will add an all day event for the first day of the week (Monday in Europe) that shows the current week number.
Open the following page and save it as weeknumbers_2010.ics:
http://www.sanneblad.com/scripts/weeknumbers_2010.php
Double click the file weeknumbers_2010.ics to import the calendar events to iCal. Choose to import the data into a new calendar called “Week numbers” so you can easily hide or remove them if Apple some day should decide to add week numbers to iCal or the iPhone. Done!
Finally – if you want the events in Swedish style (“Vecka 31″) you can use this link instead:
http://www.sanneblad.com/scripts/veckonummer_2010.php
Remove .DS_Store files
If you want to remove hidden .DS_Store files in a folder and do not use a Finder replacement like Path Finder that can show hidden files, you can use the Terminal to easily remove the .DS_Store files using the following command:
find . -name *.DS_Store -type f -exec rm {} \;
The above command searches recursively down for all .DS_Store files and removes them without asking.
Screenshots in OSX
- Command-Shift-3: Take a screenshot of the screen, and save it as a file on the desktop
- Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop
- Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
- Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
- Command-Control-Shift-4, then select an area: Take a screenshot of an area and save it to the clipboard
- Command-Control-Shift-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard
(Snow)Leopard-specific shortcuts:
- Space, to lock the size of the selected region and instead move it when the mouse moves
- Shift, to resize only one edge of the selected region
- Option, to resize the selected region with its center as the anchor point
System Restore in VMware Fusion
If you use VMware Fusion you can switch off System Restore to get extra disk space in Windows XP/Vista/7. On my 32-gb disk image I had 8.6 gb free space after installing Vista + Office 2007 + Visio 2007 + VS 2008. I switched off System Restore and suddenly I had 13.0 gb free space. Much better.
