This tiny text expansion macro will insert the computer’s system and hardware info, as typically required for bug reports or support tickets.
The preset text trigger is ;sysinfo
This will insert a minimal system info, like this:
Model Identifier: Macmini6,2
System Version: OS X 10.11.4 (15E65)
If you type ;Sysinfo it will insert a more verbose system info:
Model Identifier: Macmini6,2
Memory: 16 GB
Boot ROM Version: MM61.0106.B0A
SMC Version (system): 2.8f0
System Version: OS X 10.11.4 (15E65)
Kernel Version: Darwin 15.4.0
System Integrity Protection: Enabled
Finally, typing ;sYsinfo will produce this:
Model Name: Mac mini
Model Identifier: Macmini6,2
Processor Name: Intel Core i7
Processor Speed: 2.6 GHz
Number of Processors: 1
Total Number of Cores: 4
Memory: 16 GB
Boot ROM Version: MM61.0106.B0A
SMC Version (system): 2.8f0
Chipset Model: Intel HD Graphics 4000
VRAM (Dynamic, Max): 1536 MB
System Version: OS X 10.11.4 (15E65)
Kernel Version: Darwin 15.4.0
System Integrity Protection: Enabled
Time since boot: 8 days 46 minutes
Don’t know if you’ve seen it, in the “Resources” group at the beginning of the macro you have some scripts that show you the unfiltered output of SPSoftwareDataType, SPHardwareDataType and SPDisplaysDataType. This may help to quickly compose a custom info set.
Ah, I see, I forgot to explain the mnemonics for my abbreviations
Basic level: all lowercase 1st escalation: 1st character uppercase 2nd escalation: 2nd character uppercase
BTW, for your modified triggers no regex matching is needed. This…
Model Name : MacBook Pro
Model Identifier : MacBookPro6,1
Processor Name : Intel Core i7
Processor Speed : 2.66 GHz
Number of Processors : 1
Total Number of Cores : 2
Processor Interconnect Speed : 4.8 GT/s
Boot ROM Version : MBP61.0057.B11
SMC Version (system) : 1.57f18
Chipset Model : Intel HD Graphics
VRAM (Dynamic, Max) : 288 MB
gMux Version : 1.9.22
Chipset Model : NVIDIA GeForce GT 330M
VRAM (Total) : 512 MB
gMux Version : 1.9.22
System Version : OS X 10.11.4 (15E65)
Kernel Version : Darwin 15.4.0
System Integrity Protection : Enabled
Time since boot : 2 days 20:45
To expand @ccstone’s contribution to format as a table, here is how you can specify a mono-spaced font for pasting into other applications. @Tom, this might help with the email showing in a proportional-spaced font, but it actually depends on the email program.
Append the following code to the end of Chris’ command. It will take the columnized output, convert into Rich Text Format with your desired font, then puts it onto the clipboard.
I tested this, and also the KM-native RTFing action, but it doesn’t work if you have plain text fields (for example a new Mail message set to plain text, or any document in BBedit, etc.)
This means that you have to have two macros, one for plain, one for rich text. (Or a “if then” clause).
So, while these table-styling approaches are very nice, they are not robust at all. I still think that the vanilla approach is the most convenient.
The pasteboard will send the contents back in whatever format the application is asking for, if it is supported (ie you can't paste an image into a plain text document)
[quote="ccstone, post:13, topic:3337"]I'm shocked the RTF won't paste as plain text where appropriate
[/quote]
When it wasn't working for you, did you get the raw RTF code? If so, that is bad. It could mean the pboard service has failed. A reboot is usually required. Here is a good write-up of the issue.
After sending to the pasteboard, switch to the Finder and select Edit>Show Clipboard. It should show formatted text and at the bottom it should say the contents are RTF.
I tested both versions and the text was on the clipboard as RTF. Here are some quick results.
In TextEdit with a Rich Text document, it pasted as formatted RTF text.
In BBEdit, it pasted as plain text.
In Chrome, composing an email message in Gmail, it pasted wrong. It was Sans Serif text and padding added between each line, as if they were paragraphs.
If I ran cat file.rtf | pbcopy, I had mixed results. Sometimes it would paste RTF but other times it would not paste anything and then the Paste option stopped working as if the clipboard was empty or contained something it couldn't accept, but only for that app until I quit/restarted it.
tl;dr:
After more testing and research, I've determined that the pbcopy/pbpaste utilities are flaky and probably shouldn't be used if possible. I would recommend removing the | pbcopy from the script and have KM save it directly to the clipboard.
Thanks, Chris. I had tried this before, too (that’s what i meant with “KM-native RTFing action”) and now I literally spent half an hour to find out why yours is working while mine is not. And the thing was…