I have recently switched over to using a MacBook Air as my primary computer for development and personal usage. I quite like it, as it’s lean, fast and for the type of work I want to be doing on it, it has all the processing power I need.
Outside of getting all my development dependencies, apps, and such installed, there are a few things that I wanted to change about my computer that are simple to do, but I often forget the commands for doing them.
I figured that I’ll eventually need to do these again some day, and maybe they’d be useful for someone else, so here we go.
Updating Screen Shots
To change the location of where screen shots are saved, when using Command Shift 3 or Command Shift 4, open terminal (located in: applications > Utilities > Terminal) and type enter the following command:
defaults write com.apple.screencapture location ~/New_File_Path_Goes_Here
Changing the location isn’t all I want to do though. By default macOS saves screen shots as .png files. While this may be fine for most people, I would rather my screen shots be set to .jpg by default, as they’re typically around half the file size, and I have needed these for blog articles, or to use in GitHub issues.
Using the following command, you can change the file type from .png to .jpg
defaults write com.apple.screencapture type jpg
If you want to change the default to a different file type, swap out
jpg with one of the following:
After running those two commands, running the following will apply the changes and the next screen shot you take will be in your designated folder, with the modified file type.
Show Hidden Files, Folders and Status Bars
As OSX evolved, and eventually became macOS, the UI of the operating system was refined and streamlines. Many of these changes may go unnoticed by the average user, but some of these changes hid things that may be important to you, as a developer. The following commands will reveal some files and features that are hidden by default.
Show dot files
I need to create and edit a lot of dot files, for the various project I work on. Those files are typically hidden by default since the average mac user likely will never need them.
To reveal dot files on your machine, run the following:
defaults write com.apple.finder AppleShowAllFiles YES
To hide them again, simply replace
Show Path and Status Bars
I like my folders view setup as a single column list view. The columned view is nice if I need to get to a parent folder quickly, but I personally don’t like switching between folder views.
Running this command:
defaults write com.apple.finder ShowPathbar -bool true
Will reveal the path bar, going all the way back up to the hard drive.
Speaking of the HD, running the following will reveal the status bar, which will indicate how much disk space is remaining, among other information about the current folder:
defaults write com.apple.finder ShowStatusBar -bool true
That’s it for now
Have other suggestions of ways to modify a Mac? Let me know on Twitter