Live data from Hacker News

macOS command-line tools you might not know about

saurabhs.org

381–390 of 454 posts

Re: macOS command-line tools you might not know about

#381

You can use sips together with iconutil to generate a complete .icns file for your app from a single 1024 by 1024 PNG without any third party software: mkdir MyIcon.iconset cp Icon1024.png MyIcon.iconset/icon_512x512@2x.png sips -z 16 16 Icon1024.png --out MyIcon.iconset/icon_16x16.png sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_16x16@2x.png sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_32x32.png sips…

[dead]

Re: macOS command-line tools you might not know about

#382

Earlier quoted context omitted.

Integration is the primary reason I enjoy using Apple ecosystem. My phone, laptop, tablet and watch all work seamlessly together. I use most of Apple's "built in" applications like Mail, Notes, Photos, etc. with Firefox (instead of Safari) probably the only exception to that.

It’s wonderful when it works. For reasons beyond my comprehension, the Watch unlock for my Mac only works ~10% of the time.

There’s a fix for it where you remove all the unlock entries in Keychain, and then re-enable it. Only thing that worked for me long term (but it did fix it 100%)

https://georgegarside.com/blog/macos/fix-apple-watch-auto-un...

Re: macOS command-line tools you might not know about

#383
post #243

Earlier quoted context omitted.

Some of the “not working” cases may be due to the application you’re copying from setting the items as `localOnly`, ex: from a password manager. I don’t have an explanation for other failures. https://developer.apple.com/documentation/uikit/uipasteboard...

Yes it’s 1Password. I use the very old, iOS only non subscription version 7.something. But I think sometimes it works (copy from iOS paste on MacOS).

Wonder how many of us are out there!? Long live this app and workflow, iCloud sync ftw.

Re: macOS command-line tools you might not know about

#384
post #137

Caffeinate is definitely the one I miss most on Windows. Super handy to keep your machine awake whilst some task is ongoing.

Amphetamine has been my go-to app for keeping my Mac alive, especially since Apple tried to remove it from the App Store because, according to [someone?], the name violated App Store rules. https://apps.apple.com/us/app/amphetamine/id937984704

I switched to Amphetamine a few years back because caffeinate doesn't work consistently.

Re: macOS command-line tools you might not know about

#385
post #243

Earlier quoted context omitted.

Some of the “not working” cases may be due to the application you’re copying from setting the items as `localOnly`, ex: from a password manager. I don’t have an explanation for other failures. https://developer.apple.com/documentation/uikit/uipasteboard...

Yes it’s 1Password. I use the very old, iOS only non subscription version 7.something. But I think sometimes it works (copy from iOS paste on MacOS).

I’m on the same version of 1password, probably for similar reasons.

In their iOS app, there’s an entry in Settings -> Security -> Allow Universal Clipboard which lets you opt-in to passwords through the clipboard. I suspect there’s something similar on macOS.

Re: macOS command-line tools you might not know about

#387
post #8

`pbcopy` and `pbpaste` are one of my most-loved in the list. Dealing with some minified json, switching to iTerm, doing `pbpaste | json_pp | pbcopy` and having a clean output is _so_ nice.

So much of my Linux use is over ssh from a MacOS client that I've made a `pbcopy` executable that just pipes stdin over ssh to my MacBook to its pbcopy (with a dedicated ssh key that runs this as a forced command). Makes it super nice to be on an SSH session and `pbcopy` some content to my MacOS clipboard!

You might want to have a look at osc52

Re: macOS command-line tools you might not know about

#388

At the risk of sounding like an idiot, can someone please explain why I cannot use `networkQuality` when zsh is my shell? Is there an alternative for zsh?

It’s not a shell utility, it should work with any shell.

  $ which networkQuality
  /usr/bin/networkQuality

Re: macOS command-line tools you might not know about

#389
post #273

Earlier quoted context omitted.

Speaking for myself, the first form is more natural- even if it’s a useless cat, because I’m always cat-ing files to see their structure. Then progressively tacking on different transforms. And then finally putting it in whatever I want as output. It’s so ingrained, I’m more likely than not to just write it out that way even when I know exactly what I’m doing from the onset.

If you're using zsh, you can just replace any instance of $ cat somefile ... with $ For bash, this only works if you have at least one `|`.

I did this last time I saw it come up and was surprised! Doing it makes perfect sense in hindsight. Neato!

Re: macOS command-line tools you might not know about

#390

You can use sips together with iconutil to generate a complete .icns file for your app from a single 1024 by 1024 PNG without any third party software: mkdir MyIcon.iconset cp Icon1024.png MyIcon.iconset/icon_512x512@2x.png sips -z 16 16 Icon1024.png --out MyIcon.iconset/icon_16x16.png sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_16x16@2x.png sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_32x32.png sips…

If you really want nice looking smaller icons (16x16, 32x32) you'll have to hand edit them after scaling down to get something that looks crisp.

That said I just checked some macOS system icons (get info on app, select icon, copy, create new document in Preview.app) and they don't seem to be hand adjusted any more.

Post reply on HN