MacOS – Switching from Ubuntu to OS X and I’m lost

keyboardmacossftpterminalwindow-manager

Situation

I got tired of some bugs/annoyments in Ubuntu(=some programs coming along with it). For example after using compiz for a few days I found bugs that were
distracting my work flow pretty bad (e.g. https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/933776).

What I also hate is what I call "monitor lottery", it starts when you plug in an external video-output to your machine. Sometimes you win, and most times you don't.

I needed fresh air and Windows was not an option. I just don't like .bat, cmd.exe, C:\, and those windowsy things.

So I bought 13" Macbook Air.
Someday I probably will test how to code an app for my iPad, so being in Apple-camp helps.

I'm trying to use the Macbook as my main working/coding laptop, because it is light and has better resolution than my current laptop(Thinkpad X220).

Problem

Maybe I'm not used to OS X's philosophy or something. I don't understand the window manager's behavior.
I don't fully understand the behavior of the bottom dock.

I'm quite lost.

Questions

Workspace = single virtual desktop

Window management

When pressing Cmd-Tab and the app switcher pops up:

  • I have 5 terminal windows open, and would want to bring one of them in front. Is it possible that Cmd-Tab would be window-switcher instead of app-switcher. I know I can switch to app's next window with a shortcut, but I would want to have all the windows in the switcher, regardless of what the app is.

  • When switching to a minimized app, workspace will be switched where the window should be, but the window stays minimized. Why? I would want it to be shown(unminimized?).

  • In my Ubuntu machine, I move window's position by pressing Alt, holding left mouse and dragging it from anywhere on the window. Also resizing works by holding right mouse button instead of left. Any solution to emulate this behavior?

  • I usually use windows in maximized mode. For example when I'm editing text, I do not want to see any distractions(like a browser window). To my mind, maximized means that a window takes all available space on the screen but does not cover the system's toolbars etc. But when I press the green (+) button, the window is streched vertically and the width stays the same. The weirdest thing is, that some of the windows strech only vertically, but some of them strech both vertically and horizontally. I want the maximize button to take all the available space. Is it possible?

Shortcuts

  • In my web browser, I have always closed tabs with middle click. Also if I want to open a link to a new tab, I press middle click. How can I do that? I often browse news etc with one hand on the touchpad, so pressing Cmd while clicking isn't that good. Touching or tapping(not pressing the whole thing down with force to hear a click sound) touchpad with three fingers would be the best shortcut.

  • I want the following global shortcuts. The apps should open in the current workspace.

    • Ctrl – < : New terminal window opens
    • Ctrl – Alt – b : New terminal window opens and it executes a command: 'ssh bla bla bla'
    • Alt – m : Maximize/Restores the earlier size of currently focused window.
    • Ctrl – Alt – c : Browser opens
    • Ctrl – Alt – s : Text editor opens

    Is there any program that would allow this?

Apps/Other stuff

  • Terminal

    • Pressing Alt-2 normally produces '@'. But in terminal, it does not produce that character but instead it starts a mode which says '(arg: 2)' on the left.
    • Not directly related to terminal, but is it possible to setup SSH so that the connection would not drop when lid is closed or internet disconnects? Any experiences of MOSH http://mosh.mit.edu/?
  • With my Ubuntu laptop, I edited files in a remote SSH server via STFP. Are there any good SFTP clients which could just mount the remote folder, like in Ubuntu it does.

Best Answer

Welcome to OS X. It can be a great aid to your workflow, and make you more productive. You should be able to adjust pretty quickly after the initial learning curve. Please be advised that there are some small things you'll have to change in your workflow, as OS X is after all a completely different OS. But over time, you'll grow to enjoy it. I'll address your specific concerns.


Dock Behaviour

The Dock has several sections. Assuming you kept your dock on the bottom, the left side contains pinned and currently running apps. This is actually similar to Unity. You can enable a "dot" under running applications by right-clicking an empty space in the Dock and clicking Dock Preferences from the context menu, and selecting Show indicator lights for open applications.

After the divider, which can be clicked and dragged to resize the dock, there are your stacks. Stacks are previews to commonly-accessed folders, and you can drag any folder into this spot. You can preview the contents of stacks in several ways, right-click it to view the stack's options.

To the right of the stacks are the minimised windows or documents. OS X typically dedicates windows to documents, so the terms (especially in the old days) were considered pretty interchangeable.

Dock


Window Management

This was one of the biggest pain points when I switched, and now I really enjoy it.


Viewing Application Windows

You can quickly switch between open windows of the same app by pressing Cmd+`.

As you Cmd + Tab, you notice that you're tabbing through apps and not their individual windows. Note that you can activate an app (i.e. un-minimise or un-hide windows by holding down alt (option in the US).

If you want to see what windows an application has, you can either:

  • Press the Down arrow while the Cmd + Tab selector box is over the app.
  • Right-click the app's dock icon and select "Show All Windows".
  • If you are in the app, swipe three or four fingers down on your trackpad (configured by click the Apple on the top left, opening System Preferences, opening Trackpad, navigating to the More Gestures tab, and selecting to activate App Exposé with three or four fingers.).
  • Swipe three or four fingers down on its dock icon.

Any of those options (there might be more) will take you to App Exposé, this will show all the open windows in the center of the screen, and any minimised or hidden windows as thumbnails.


Switching to a minimised window in a different workspaces

This behaviour is app-dependent. Using a Finder window, the behaviour is as you wish. i.e. the window un-minimises itself, and the workspace is switched. Make sure to click the minimised window and not the app icon.

You might want to make certain apps available on all your workspaces. To do this, right-click the app's dock icon, and select its behaviour under the Options > Assign To section. The app needs to support this feature.


Moving and Resizing

Windows can be moved using only the chrome (the grey area above the app's actual content). Most of the chrome is on the top of the window, but certain apps such as Finder have bottom chrome that can be used to move the window around.

OS X does not recognise right-click drags. It just doesn't. The only real way to resize windows is by dragging from any edge using the left mouse button.


Using BetterTouchTool

If you want, you can download the excellent BetterTouchTool. Under Preferences, Advanced, Action Settings, Window Moving & Resizing, you can choose to move the window under the mouse by simply holding down a key (e.g. the alt (opt) key.

You can use BTT to change certain behaviours to just the way you want them. It's extremely powerful. You can also assign custom gestures to do almost anything, in any app (or globally).

BetterTouchTool
BetterTouchTool's advanced settings.




Maximising and Zooming

OS X does not use the green "+" button zoom button to represent "maximise". That's the "zoom" button. The idea is that the app expands itself to occupy as much space as it needs. Unfortunately, the behaviour is extremely inconsistent, especially with third party apps.

More and more apps are beginning to support the FullScreen mode, which was a feature introduced in OS X 10.7 (Lion) fullscreen button. This button, if an app has it, will dedicate an entire space to the application. It will be accessible from Mission Control.

I'll give you two options, both involving third-party apps:

BetterTouchTool has an option to enable Windows-style snapping. So when you drag a window to the top of the screen, it will expand to fill the screen.

BTT options

Another option is to use RightZoom, which claims to change the functionality of the green zoom button to mimic a maximise button. It's free, but I haven't yet tried it.


Shortcuts

You can create a ton of shortcuts in OS X, even to specific menu-items from System Preferences. I'll address your specific concerns here.


Middle click to open and close tabs

I long ago solved this with BetterTouchTool. All you need to do is assign a shortcut like below, and it will be mapped to a three-finger click on your touchpad. You can choose anything else (e.g. three-finger tap if you prefer).

bettertouchtool

Middle click allow you to open a link in a new tab.

Safari does not support the closing of tabs using middle-click. You either need to click the little "x" that appears over the tab, or press Cmd+W.

Google Chrome supports middle click for both closing tabs.


Global Shortcuts

BetterTouchTool can make quick work of assigning some global shortcuts. I don't think you'll be able to replicate the Ctrl + Alt + B (opens a text box, then executes the command in a terminal).

Cmd + M will minimise a window, no need for BTT for this.


Etc

Apologies, but I can't answer your MOSH question


Alt-2 in Terminal

On my laptop, Alt + 2 produces the euro symbol, so it's keyboard-dependent. If you want the "@" symbol, it's normally found by pressing Shift + 2.


SFTP

I normally use CyberDuck for all my FTP needs. However, a quick web search turned up this: How to mount SFTP shares in Lion.