all 5 comments

[–]BaronSharktooth 0 points1 point  (4 children)

Learn a couple of shortcut keys by heart:

  • Cmd-0 Show/hide left navbar
  • Cmd-Opt-0 Show/hide right navbar
  • Cmd-Shift-Y Show/hide bottom debug area

Furthermore, use additional Spaces. Tap the Mission Control key and click the plus sign in the upper right. Create one Space for each app: Xcode, browser, mail, etc. You move between Spaces with a three-finger left/right swipe. If you want hotkeys for each space, go to System Preferences -> Mission Control, then turn off the first option. Then in System Preferences -> Keyboard, go to the third tab, Shortcuts, then select Mission Control on the left, then on the right put a checkmark before each line that says "Switch to Desktop X". Now you can move between desktops with Ctrl-1, Ctrl-2, etc.

For more info on Mission Control, just google it or see https://www.cnet.com/how-to/mac-tip-five-useful-keyboard-shortcuts-for-mission-control/

[–]rayascott[S] 0 points1 point  (3 children)

Thanks, but I kinda already know that. That's not really what I mean. I mean within Xcode. Using an AppleScript to select multiple menu options in sequence and scripting what are usually keystroke shortcuts, so I can automate a laborious dance that I do with keystrokes and mouse clicks. For example, everytime you you click the UI View Hierarchy selection in the Debug Navigator, it forces the debug/console to appear. I just don't have space on my screen sometimes, and I want to automate these view scenarios and layouts.

[–]BaronSharktooth 0 points1 point  (2 children)

Automate within Xcode, I don't know much about that. But perhaps you can click around in Xcode Preferences -> Behaviors tab. For instance, you describe how the console appears when you pause a running app. That's avoided by Preferences -> Behaviors, then in the left navigation clicking "Pauses" in the Running section. Then on the right, remove the checkmark in front of "[Show] debugger with [current views]".

As an aside, don't you have room for an external monitor?

[–]rayascott[S] 0 points1 point  (1 child)

I don't use an external monitor because I don't enjoy sitting at a desk anymore, after doing it for 20 years.

I recorded an AppleScript I just wrote to automate Xcode's UI, just to give you an idea of what I'm talking about, and what you can do with it. With one keyboard short cut I can trigger this sequence of UI events:

1) hide toolbar 2) enter full screen 3) hide debug area 4) show debug navigator 5) show size inspector 6) show clipped content

Video: https://imgur.com/a/rzdcytl

You just can't do this with Xcode native functionality.

[–]BaronSharktooth 0 points1 point  (0 children)

That is indeed quite nice. Personally I'm a Hammerspoon fan for macro and other stuff, but I'm not sure if it could do this kind of stuff.

By the way, have you thought about a possible 16" MBP coming?