I downloaded a command line utility from this github webpage . I clicked on the green Clone or Download
button to download the zip file. Although, there are also files that can be downloaded from the releases tab. I'm not sure whether I'm supposed to download those files instead. After downloading and unzipping the zip file, I double-clicked on the file entitled displayplacer
, which opened a terminal window that ran a bunch of commands.
Now what? How do I use this program?
I tried opening a new terminal window and running displayplacer list
which, according to the github page, is supposed to Show current screen info and possible resolutions. However, the terminal window returned zsh: command not found: displayplacer
after I entered the command. Did I not install the code properly?
Ultimately, what I want to do is set up a keyboard shortcut that switches the primary display between my macbook's internal display and my external display. How do I do this?
(macOS catalina)
Best Answer
Installation:
sudo mv ~/Downloads/displayplacer-master/displayplacer /usr/local/bin/
sudo chmod +x /usr/local/bin/displayplacer
displayplacer
All other files included in the zip won't be required to run the exec.
Usage:
displayplacer list
With the properties and the various possible switches create an arrangement. One example with four monitors is listed:
I have no 2nd screen in my virtual machine so I partly have to guess what it means:
The first two monitors (1440x900) are mirrored and contain the menubar. The third is on the right and rotated by 90 degrees (clockwise?). The fourth is on the left and rotated by 90 degrees (counterclockwise?).
Automator:
After finding appropriate settings (at least two if you want to switch the primary display between [your] macbook's internal display and [your] external display: back and forth) you have to create two different services/quick actions/etc. each containing one shell script ("Run Shell Script") with the proper displayplacer "id:.... line.
Depending on your Mac hardware and your system version you can apply a shortcut or even add it to the Touch Bar.