I've been working on a MacBook for a little over 6 months now, and in that period I've managed to lose half my hair find tools and supplementary software to help improve my productivity.
With the things mentioned in the article I've managed to remove a lot 'micro interruptions' that shouldn't have existed to begin with.
I figured it might be good to share them. One, it'll possibly save immigrants from Linux land like me some effort and two, it'll help me if I ever need to setup an OSX box from scratch again.
There's a ton of tools that I've used over in Linux/Gnome land but I missed for quite a while in OSX land. There were also tools that I didn't have in Gnome/Linux land, but found in the OSX application ocean. They were good enough to make me look for similar tools for my Linux box.
I'll also try to cover some problems one might face when managing multiple *Nix machines, and my solutions to said problems. If you're like me, you'll have a lot of stuff common across the two machines.
So without further ado.
Must do things
These are a list of things you should probably get out of the way the moment you get your flashy new Mac.
I'm a lazy blogger so I'll add links to tutorials and descriptions for how to do these later. For now simply Googling "How do I X" should work.
Caveat: A lot of these come down to personal preference, so pick and choose your own key features.
- Setup root
- Enable SSH access
- Speed up keyboard key input speed
- Disable extra characters on key long press
- Enable dock hiding
- Enable screen lock on screensaver
- Enable hot corner to lock screen
- Apple Productivity Suite
The default 'Terminal.app' is bad. If you're used to using decent terminals with lots of options, like gnome-terminal, rxvt or terminator on your Linux box, you'll immediately notice the lack of features that the default app offers.
What you want then is a terminal emulator that's very stable and has lots of features to play around with. Enter iTerm. It is by far the best terminal application on OSX. It has more features than I've seen in any other terminal emulator (ones on linux included) and it has inbuilt integration with tmux, so you can split it into panes with shortcuts if that's your style or use it like your usual terminal application with tabs.
One particularly cool feature I found only after I went looking was iTerm's drop down terminal. If you're a Linux user, you might've used or come across drop down terminals before in the guise of gnome-drop-down-terminal or Guake or their brethren. iTerm supports a drop down terminal as well, you can enable this feature in iTerm's preferences and map the drop down terminal to a hot key just like the good 'ol days.
If you're from Linux land, you know what a package manager is, and if you've ever used them you love how easy they make it to install and manage software on your machine. The lack of a package manager on a *nix machine is an instant turn off. Thankfully I'm not the only who feels that way and thus Homebrew was born. It's aims to be the missing package manager for OSX, and I think it's mostly there. Homebrew is written in ruby and has things called recipes which take care of downloading installing and configuring packages.
The only flaw with Homebrew is that it's great with packages required for typical software development, you'll find all the stuff needed to setup your language-or-framework-of-choice's tool chain and development environment, but if you want remotely network-y, say wireshark or hydra or hping and their ilk, then you're going to have a harder time than you expected.
There's another project similar or Homebrew called MacPorts, which is a little older and perhaps not as widely used as Homebrew now. You can try whichever one you like, but pick one and stick with it. If you try to use them both simultaneously, "You're gonna have a bad time"
This is one of those tools that was life changing. If you've used a computer with a modern operating system you've experienced dragging an application to the side of the screen to make it consume a fixed about of space (say left half) and then dragging another window to the other side to make it occupy the right half. This way you can view both windows side by side, super useful. This is called window snapping. It's a fairly simple concept. Windows can do it, Most DWMs on Linux can do this and more (I'm looking at you i3), even your new flashy smart phones can do it.
So pardon me when I say that I find it strange when OSX can't do it. If you drag something to the side or to the corner, it'll do nothing, half of your application window will just sit there, the remaining bit of the window sticking out the side of the screen awkwardly.
It doesn't just let you drag and drop windows to the side, infact it actually doesn't let you do that (not with the mouse anyway, for that you want Cinch).
What it does let you do is control you current window using your keyboard. Want it in the left half?
⌥ + ⌘ + ← Easy. Want it in the top right quarter?
⌃ + ⌘ + → You got it. Vertical splits, horizontal splits, halves, thirds quarters, it does them all.
It's the closest thing to a tiling window manager you can get on OSX, and it's a lot more accessible than most of the Linux Tiling WMs.
Alfred is one of the most powerful dashboard search applications for OSX. It's essentially a genetically enhanced version of Apple's default spotlight search.
Summon it from wherever using a shortcut you can define (I've mapped mine to
opt-space), and then type in whatever you're looking for, an application you want to launch, a half remembered file name, an executable script, web query, map route, you choose. It'll show you the top suggestions that match you query and you can pick the top one with just an
Enter or you can pick any of the others using
Also see how Alfred is ruining other people's lives
Side Note: OSX 10.10 search spotlight search looks an awful lot like Alfred, possibly because Alfred was an inspiration in it's design, yet despite the visual similarities, Alfred remains the more powerful, flexible and customizable of the two
Note for Linux Users: This method of searching and opening files and folder is so fast and addictive, that my workflow on the linux box just seemed slower, so the alternative for Linux is called Gnome-Do and it works fairly well, it's just a tad bit on the unpolished side in the UI department.
f.lux or flux is an interesting application. It tracks the time of the day, the brightness during different periods of the day and the ideal brightness using your longitude and latitude.
It then applies a forced red shift to your display during the evening and night hours. The practical advantages of this are: 1. It makes humans less likely to stay up starting at bright blue screens. Blue light makes people think it's day and fools the body into staying awake. 2. It drastically reduces the strain on the eyes, especially for people who like working late at night.
Side Note: f.lux is available for Windows, Linux and rooted iOS. Use it everywhere you can.
Caffeine is a simple a simple application, and what it does it simple as well. Like it's namesake it keeps the computer from falling asleep once switched on.
Why would you want to do this? If you're reading or watching a video on your macbook on battery, and haven't the touched the mouse in a while, the computer will think it's idle and it'll try to put itself to sleep. But since you're still passively consuming the contents on the display, that really isn't ideal. So Caffeine is a straightforward solution for that.
Apple Productivity Suite
I mention these specifically, because they're very good at what they need to do, at least day to day. Unlike MS Office which is more powerful, but a little overwhelming to use or LibreOffice, which doesn't do so well in the looks department Apple's tendency to generally pick sane defaults that are work and look good simply shines here. Pick one of the very well designed starting templates for your document or Presentation and you're good to go.
Side Note: They're good daily drivers, but if you ever need to do heavy weight document writing, such as writing your thesis or a book, do yourself a favour, write it in LaTeX
OSX being OSX
There's a ton of OSX quirks lying around waiting to be discovered, here's a list of some of the more notable ones.
- OSX's shortcuts. OSX shortcuts are similar yet different enough to cause chaos and confusion. It's always a good idea to go back and take a look at the Wikipedia article on shortcuts to brush up memory.
- Readline Everywhere. OSX seems to use GNU's readline bindings almost uniformly for all their text inputs, so cool stuff like
C-Afor start of line,
C-Efor end of line that you might be used to from Bash/Emacs is all available almost everywhere in OSX.
- Spotlight search/Alfred. Learn to love one if not both these tools, master them and you'll rarely touch the mouse/touchpad again. They give you instant access to almost anything you'll need, files and applications, no need to browse through the fancy, but inefficient application menu.
- PermaDelete. There is no delete permanently shortcut
shift-del, or if there is I've never found it. You always need to 'Send to Trash' and then empty trash. Alternatively you can write a scriptlet and associate a shortcut with it, but at that point you might as well use rm.
- Cut-Paste. The "Cut - Paste" isn't the kind people are used to from Win/Linux. There is no
Cmd-P, instead the way Apple would like you to think is,
Cmd-C(copy) and then
Cmd-opt-P(paste with removal of original files)
- Search. Search default in Finder and elsewhere is an insane "Search all the files on the computer". Finder and Spotlight will both always search in the global filespace instead of searching in the local folder first, you need explicitly tell it to search in your current folder.
- Apple and it's Filesystems. Apple uses HFS+ which is great and all in that it behaves like a decent ext filesystem from the user's perspective for the most part, except when it doesn't. HFS+ is not case sensitive, but it pretends to be, which results in lots of "fun" situations. OSX also doesn't like to play well with most other file systems, most notably NTFS. So if you want to copy a 4GB+ file from OSX to windows via your HDD/pendrive? Good luck.
- AppleScript. I put this last because I've never used it extensively, but the amount that I have used tells me this is an extremely powerful scripting interface for OSX and lets you script the GUI applications and their behaviour with little to no effort. This is unlike bash/python/etc. scripts that are best geared for command line scripting
Managing files across *nix Machines
If you're a developer, or even a power user, you're likely to have a ton of `rc` files on your computer that you've lovingly crafted and perfected over the years to suit your needs.
Ever so often, you'll find something new and make changes to them and that's how these files grow.
The problem when you have multiple *nix machines is how to manage keeping these files in sync.
The naïve way of doing it is to simply copy the files to other machines whenever you're done with them, and that's that. But, it's not. Copying files from machine to machine can get rather cumbersome over time, and eventually you're likely to give up doing it. This means your experience across machines will begin to vary, and you'll not be as productive on all your machines.
Enter dotfiles. Store all your rc or dotfiles in a git repository on someplace like github, and simply softlink them to the correct locations on your local machines. You can then make changes to the files as and when needed and have a cronjob update the the git repository on all the other other machines regularly (say every night). This way all your configuration files for your text editor, git, shell etc. stay in sync all the time.