osx transition notes

Created: May 28, 2022Published: Mar 28, 2023Last modified: Apr 05, 2023
Word count: 1322Backlinks: 8

Coming back to OSX after years away in linux has been mostly positive.

The things that annoy me are still a bother, but knowing what they are has helped me think of them as more of a joke. Not that it's funny per-say, but thinking of it as funny helps me deal with it.

Other things are pretty great - there are some nice things that make me very happy to work with the hardware. I do enjoy deving on OSX - it's not as unreasonable as it might have been. This is mostly thanks to a few nice tools, some patience, and of course, the clojure repl.

Mentality

> Uncompromising

In the past, I've rolled over a bit to work in the walled garden. That was when I was learning to dev, and already integrated into OSX.

Arch unlocked me - moving to arch opened me up - it would never have occured to

me that you can just write a script for that. Somehow Apple taking care of me

prevented me from taking the next step into automating and owning my own

computer - it was always theirs. (If you're reading this on OSX, I'm sorry, but

you'll have to run a system upgrade before you can read the rest of the article.)

Now that I've been away for a while, I want to come back and achieve a workflow as close as possible to what I have on linux.

That means the same keybindings, the same workspaces. The same UI?

>> There are of course, exceptions

>>> emacs crashes (everywhere) when a full screen window is closed

So I just don't use full-screen emacs. I didn't use this on linux, but thought it might be interesting on OSX, especially for a small screen.

Bad things

> homebrew

For better or worse, we can't quite get away from it.

On Manjaro/Arch I use `yay`. The experience is roughly the same, just a little worse around the edges.

I should be more specific here...

> Emacs server (via brew services)

On linux i'm accustomed to running daemons with systemd, and logging them with journald. There are imperfections, but at least it feels maleable, and I'm quite used to it.

Brew services tries to stand in for this, but it takes no responsibilty for logging - good luck figuring out where your service's logs end up.

> Alfred vs Rofi

Alfred is great, but quite different from Rofi - this caught me off guard. I now make extensive use of Rofi in Clawe, and was excited to get back to Alfred, thinking it would unlock more fun.

It turns out there's no command line interface to Alfred at all - you can't pass a list of items into it and get a selection back out. Instead, you have to wire everything up through their UI, and which is quite limited in terms of entry points. Pretty frustrating after working with Rofi for a few years! Alfred feels inacessible from shell tooling/other apps. Maybe it integrates well with them, but not vice-versa.

I found a minimal alternative ( choose ) that's not too much code - maybe it's worth learning more about, or starting to build up features on top of.

> Ctrl vs Cmd Keybindings

I'd like basic linux and osx keybindings ones to pretty much match:

  • ctrl+c/x/v for copy/cut/paste everywhere...
  • ctrl+r to reload the browser
  • whatever the open dev-tools binding is

You can kind of get there - apple lets you overwrite existing keybindings on a per-app basis, with a strange match-on-exact-string settings bit. At this point I'm still discovering copy/pastes/etc that don't work and require some mixing.

> Modifier Key locations

I've finally got the modifier keys to match the linux machine, which is, from

left to right: Ctrl, Fn, Cmd, Opt/Alt

You can remap things without much trouble:

Fn -> Ctrl

Ctrl -> Fn

Cmd -> Opt

Opt -> Cmd

Getting opt/cmd to be opt/alt in emacs and in alacritty was a bizzaro journey - it's likely others will find the solution faster, but I'll document the specifics here.

>> TODO how use opt as meta in emacs on osx

something like:

(setq mac-command-modifier      'super
      ns-command-modifier       'super
      mac-option-modifier       'meta
      ns-option-modifier        'meta
      mac-right-option-modifier 'meta
      ns-right-option-modifier 'meta)

>> TODO how use opt as alt in alacritty on osx (for tmux)

> Notifications

Vs my linux api, this notifications thing needs a safer wrapper - can't

handle anything that's not a string

> Downloading Xcode

This takes a hilariously long time, regardless of your internet speed. I'm talking multiple hours. I found out a bit later there are existing workarounds for this - I was naively installing via the App Store, which is single-threaded or throttled or just still on the MVP implementation I guess.

> Messages

I can't believe I can't send a screenshot from the messages UI. I very commonly take a screenshot and then go to send it to someone. I suppose the expected flow is working with the temp-floating-screenshot popup (fancy-shmancy). If i want to Message someone a screenshot or other file, I can't do it through Messages - instead you go hunt down the file in the finder and interact with it that way. I get it, but it's frustrating to be trapped in Messages with no obvious way to pop the finder open.... eventually i realize i can do so through alfred...

My flow is from years of Slack usage.

> Finder sorting (of screenshots, and other non-zero-padded file names)

The default screenshot date format (can this even be changed?) does not sort chronologically in the finder. The times aren't zero-padded, and they aren't military time, so your 11 pm screenshot is grouped with your 11 am and 1pm ones.

>> TODO change default screenshot date format

> Apple Script/obb

Getting all my safari urls is still somehow elusive. Possibly b/c I'm creating multiple safari instances?

Good things

> Battery Life

I can take this to a coffee shop/bar, and leave the power cord at home, and sit anywhere.

> Form factor, keyboard, yada yada

I'm not too picky about this, but it's better to have keys than the touch bar, and it feels nice to type on.

> Fancy: Unlocking with finger/touch or apple watch

Reluctantly, this is fairly impressive

> Yabai

Yabai is pretty great - the instructions/install was not easy, but it is pretty smooth once you're through it.

Notes re: SIP and security, yada yada

>> Bad: Yabai drops labels when restarting

I get it, and other WMs do this too...

Holding onto workspaces is an important feature, but WMs seem to leave that one to user-land.

Either your startup script needs to be implemented such that it recreates workspaces (which is typical, I'm reluctant to admit), or you otherwise need to save and restore state yourself.

>>> TODO how do i do this in clawe/yabai now?

> Bluetooth

Very solid, works perfectly. Crushes the linux experience, which is more like an eventual stability full of dragons, drivers, and :fingers-crossed: system updates.

> Messages

It's nice to be able to text from the computer again!

> Apple Script/obb

Things like dialogs are fairly nice to have, and for not too much effort.

Transitioning strategy

> Emacs first

So we can read and write working notes

Helps to stay focused and keep track of rabbit holes

Stack-popping

Writing is thinking

> Global keybindings

shift+enter for a working terminal

shift+cmd+enter for a working emacs

Ideally these would toggle

> Togglable apps

So we can pop the browser/journal in and out while debugging

>> Poor man's toggle first

yabai actually makes this quite simple

>> Clawe scratchpad toggle

For when you want things to 'just work' on one keybinding

Note the performance trade-offs. Yabai could be quicker out of the box, tho it seems possible to write the clawe config in such a way that it's smarter and the performance is unnoticable. Maybe some fancy db caching?

TODO next: finish gathering content from linked notes

There are just a few outliers - most of the content is from that first week, so

the more 'recent' links (things like breaking upgrades, gcc issues, etc)


Backlinks

December Fool's Day.

Advent of Code begins!

You know, the operating system.

See:

Rather unfortunate finding when transitioning to osx - none of my rofi tooling translates to alfred.

I could be missing something here! I really struggled to make progress in their docs, may not have found the right resource.

Sunday Funday

A rofi -for-osx tool.

During my transition to osx, this was an excellent find after coming to terms with Alfred 's lack of CLI interface.

I've built up tools and gone through many versions of this over the years. It shifts around from time to time, but here i want a place to emphasize some lessons.

Starting early today (12:01am)

working through clawe.org, pulling in some content, writing some new ideas

garden tending