macOS command-line tools you might not know about
31–40 of 454 posts
Re: macOS command-line tools you might not know about
#32Also, hidutil (https://developer.apple.com/library/archive/technotes/tn2450...).
Example:
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000049,"HIDKeyboardModifierMappingDst":0x700000065}]}'
For my PC keyboard, remaps "Ins" (normally useless under macOS) to something ("PC Execute") I can trap and remap with Keyboard Maestro.Re: macOS command-line tools you might not know about
#33`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.
I don't remember when I learned about these, but they've been game changers, and everyone I've shared them with feels the same way. I use your use case often as well, though through `jq` because I'm more familiar with it, and sometimes wish to do transforms.
Re: macOS command-line tools you might not know about
#34I use pbcopy and pbpaste probably all day long and always miss it in Linux environments.
Re: macOS command-line tools you might not know about
#35I use open regularly. Often to open a directory in finder and preview a file. Looks like I can just use qlmanage from now on.
Not sure I'd use screencapture manually, but I'm sure there are some automations that could benefit from this.
Re: macOS command-line tools you might not know about
#36Re: macOS command-line tools you might not know about
#37I remember Caffeine used to be a third-party program that would prevent your Mac from sleeping, same behavior as the `caffeinate` here. Were they acquired and incorporated into the OS?
Re: macOS command-line tools you might not know about
#38pbcopy/pbpaste are a lifesaver when doing stuff on the command line that has a lot of output and piping is not something you can do. networkQuality is something I really wish I knew about sooner.
Also for things like sharing public ssh keys. Instead of "can you send me your public key" and getting something with random line breaks depending on the users text editor I just have to ask them to "cat ~/.ssh/id_rsa.pub | pbcopy". I also alias pbcopy / pbpaste on Linux too, so useful!
Re: macOS command-line tools you might not know about
#39Re: macOS command-line tools you might not know about
#40I remember Caffeine used to be a third-party program that would prevent your Mac from sleeping, same behavior as the `caffeinate` here. Were they acquired and incorporated into the OS?