Mac OS Screenshot with TouchBar
Many know that there are some keyboard bindings on Mac OS for taking screen shots
<Cmd> + <Shift> + 3
Full screenshot<Cmd> + <Shift> + 4
Choose rectangle of what to screenshot<Cmd> + <Shift> + 4 + <Space>
Choose an app to screenshot
But for those with a Macbook Pro with a Touch Bar there is also
<Cmd> + <Shift> + 6
Screenshot of TouchBar
What if I wanted one image with both the screen and the touch bar, without having to open the images in an app?
First use the built in terminal screencapture command
screencapture screenshot.png
The -b
flag is used to take screenshot of touch bar instead
screencapture -b touchbar.png
Then imagemagick to the rescue! brew install imagemagick
.
Resize the touchbar image to same width as the screenshot
convert touchbar.png -resize 2880 touchbar.png
Append the images
convert screenshot.png touchbar.png -append screenshot-with-touchbar.png