### Install displayplacer via Homebrew Source: https://context7.com/jakehilborn/displayplacer/llms.txt Install displayplacer using Homebrew for a recommended and straightforward installation process. ```bash # Install via Homebrew (recommended) brew install displayplacer ``` -------------------------------- ### Build displayplacer from Source Source: https://context7.com/jakehilborn/displayplacer/llms.txt Compile the displayplacer binary using the provided Makefile. Navigate to the source directory, then use 'make' to build. 'make install' can be used to install the binary, optionally specifying a custom directory. ```bash # Navigate to source directory cd src # Build the binary make # Install to /usr/local/bin (requires sudo) sudo make install # Or install to custom location make install bindir=~/bin # Build with debug symbols make debug # Clean build artifacts make clean ``` -------------------------------- ### Build displayplacer from source Source: https://context7.com/jakehilborn/displayplacer/llms.txt Build and install displayplacer from source code. This method requires navigating to the source directory and using make commands. ```bash # Or build from source cd src make sudo make install ``` -------------------------------- ### Mixed display setup with mirroring Source: https://context7.com/jakehilborn/displayplacer/llms.txt Configure a mixed setup that includes a mirrored pair of displays and an independent display. The mirrored pair is configured first, followed by the independent display with its origin set relative to the mirrored pair. ```bash # Mixed setup: mirrored pair plus independent display displayplacer \ "id:MAIN-UUID+MIRROR-UUID res:1920x1080 scaling:off origin:(0,0) degree:0" \ "id:INDEPENDENT-UUID res:2560x1440 scaling:off origin:(1920,0) degree:0" ``` -------------------------------- ### Configure dual monitor setup Source: https://context7.com/jakehilborn/displayplacer/llms.txt Configure a dual monitor setup where the primary display is at the origin and the secondary display is positioned to its right. Ensure correct IDs and desired resolutions/settings are used. ```bash # Configure dual monitor setup - primary display at origin, secondary to the right displayplacer \ "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 res:2560x1440 hz:60 color_depth:8 scaling:off origin:(0,0) degree:0" \ "id:4C9EEA9B-B97A-4CE3-8E8E-4B7F6F85B3F3 res:1920x1080 hz:60 color_depth:8 scaling:off origin:(2560,0) degree:0" ``` -------------------------------- ### Configure triple monitor setup Source: https://context7.com/jakehilborn/displayplacer/llms.txt Configure a triple monitor setup with a center primary display and left and right secondary displays. Adjust origins to achieve the desired spatial arrangement. ```bash # Configure triple monitor setup - center primary, left and right secondary displayplacer \ "id:MAIN-UUID res:2560x1440 scaling:off origin:(0,0) degree:0" \ "id:LEFT-UUID res:1920x1080 scaling:off origin:(-1920,0) degree:0" \ "id:RIGHT-UUID res:1920x1080 scaling:off origin:(2560,0) degree:0" ``` -------------------------------- ### Use Persistent Screen ID Source: https://context7.com/jakehilborn/displayplacer/llms.txt Configure a display using its persistent screen ID, which is recommended as it survives reboots. Replace the example UUID with your display's persistent ID. ```bash # Persistent screen ID (recommended - survives reboots) displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 res:2560x1440 scaling:off origin:(0,0) degree:0" ``` -------------------------------- ### Use Contextual Screen ID Source: https://context7.com/jakehilborn/displayplacer/llms.txt Configure a display using its contextual screen ID. This ID may change with GPU or port changes. Replace the example ID with your display's contextual ID. ```bash # Contextual screen ID (changes with GPU/port changes) displayplacer "id:69731906 res:2560x1440 scaling:off origin:(0,0) degree:0" ``` -------------------------------- ### Re-enable a Screen Source: https://github.com/jakehilborn/displayplacer/blob/master/README.md Attempt to re-enable a disabled screen. This may not work on all setups, and unplugging/replugging might be necessary. ```bash displayplacer "id: enabled:true" ``` -------------------------------- ### Use Serial Screen ID Source: https://context7.com/jakehilborn/displayplacer/llms.txt Configure a display using its serial screen ID, which is tied to the display hardware. Prefix the serial number with 's'. Replace the example ID with your display's serial ID. ```bash # Serial screen ID (tied to display hardware, prefix with 's') displayplacer "id:s410536788 res:2560x1440 scaling:off origin:(0,0) degree:0" ``` -------------------------------- ### Mirror two displays Source: https://context7.com/jakehilborn/displayplacer/llms.txt Mirror two displays where the first ID specified is used to 'Optimize for' the mirrored output. The resolution, scaling, and origin are applied to the mirrored setup. ```bash # Mirror two displays (first ID is 'Optimize for' screen) displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230+4C9EEA9B-B97A-4CE3-8E8E-4B7F6F85B3F3 res:1920x1080 scaling:off origin:(0,0) degree:0" ``` -------------------------------- ### Silence Errors for a Screen Source: https://github.com/jakehilborn/displayplacer/blob/master/README.md Apply screen configuration while suppressing errors for a specific screen using the 'quiet:true' option. This is useful for non-critical display setups. ```bash displayplacer "id: mode: origin:(,) degree:0 quiet:true" ``` -------------------------------- ### Enable Quiet Mode for Missing Screens Source: https://context7.com/jakehilborn/displayplacer/llms.txt Use 'quiet:true' to suppress errors when a specified screen is not connected. This is useful for automated scripts where screen availability may vary. The example configures a primary screen and silences errors for potentially disconnected secondary screens. ```bash # Silence errors if screen is not connected displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 mode:5 origin:(0,0) degree:0 quiet:true" ``` -------------------------------- ### Apply Screen Configuration with Mirrored Screens Source: https://github.com/jakehilborn/displayplacer/blob/master/README.md Configure multiple screens to mirror each other, setting the resolution and scaling for the primary mirrored screen. The first screen ID in the list is used for 'Optimize for' in system preferences. ```bash displayplacer "id:+<1stMirrorScreenId>+<2ndMirrorScreenId> res:x scaling: origin:(,) degree:<0/90/180/270>" ``` -------------------------------- ### Apply Screen Configuration by Resolution Source: https://github.com/jakehilborn/displayplacer/blob/master/README.md Configure a specific screen by its ID, setting resolution, refresh rate (hz), color depth, scaling, origin, and rotation. Hz and color_depth are optional and will default to the highest available if omitted. ```bash displayplacer "id: res:x hz: color_depth: scaling: origin:(,) degree:<0/90/180/270>" ``` -------------------------------- ### List Current Screen Info and Resolutions Source: https://github.com/jakehilborn/displayplacer/blob/master/README.md Use this command to view current screen configurations and available resolutions. This is useful for identifying screen IDs and modes for scripting. ```bash displayplacer list ``` -------------------------------- ### Apply Screen Configuration by Mode Source: https://github.com/jakehilborn/displayplacer/blob/master/README.md Configure a screen using its mode number, specifying the origin and rotation. This is an alternative to setting resolution directly. ```bash displayplacer "id: mode: origin:(,) degree:<0/90/180/270>" ``` -------------------------------- ### List current display information Source: https://context7.com/jakehilborn/displayplacer/llms.txt Display current screen information, including resolution, refresh rate, color depth, and all available display modes. Use the --v1.3.0 flag for legacy output format. ```bash # Show current screen info and all possible resolutions displayplacer list ``` ```bash # Use legacy output format (v1.3.0) for backward compatibility displayplacer list --v1.3.0 ``` -------------------------------- ### Configure stacked vertical monitor arrangement Source: https://context7.com/jakehilborn/displayplacer/llms.txt Configure a stacked vertical monitor arrangement with the primary display at the bottom. The origin of the top display is adjusted to position it above the primary. ```bash # Stacked vertical arrangement - primary on bottom displayplacer \ "id:BOTTOM-UUID res:2560x1440 scaling:off origin:(0,0) degree:0" \ "id:TOP-UUID res:1920x1080 scaling:off origin:(320,-1080) degree:0" ``` -------------------------------- ### Configure Multiple Screens with Quiet Mode Source: https://context7.com/jakehilborn/displayplacer/llms.txt Configure multiple displays, silently skipping any that are not currently connected. This is ideal for environments where some displays might be intermittently available. Ensure each display's configuration is correctly specified. ```bash # Configure multiple screens, silently skip missing ones displayplacer \ "id:ALWAYS-CONNECTED res:2560x1440 scaling:off origin:(0,0) degree:0" \ "id:SOMETIMES-CONNECTED res:1920x1080 scaling:off origin:(2560,0) degree:0 quiet:true" \ "id:RARELY-CONNECTED res:1920x1080 scaling:off origin:(4480,0) degree:0 quiet:true" ``` -------------------------------- ### Save Current Display Configuration to Script Source: https://context7.com/jakehilborn/displayplacer/llms.txt This bash script captures the current display configuration using `displayplacer list` and saves it to a shell script file. It then makes the script executable, allowing for easy restoration of the saved layout. ```bash #!/bin/bash # Save current configuration to a script # Get the current profile command CURRENT_CONFIG=$(displayplacer list | grep "^displayplacer") # Save to file echo "#!/bin/bash" > ~/display-profiles/work.sh echo "$CURRENT_CONFIG" >> ~/display-profiles/work.sh chmod +x ~/display-profiles/work.sh # Create multiple profiles cat > ~/display-profiles/home.sh << 'EOF' #!/bin/bash displayplacer \ "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 res:2560x1440 hz:60 color_depth:8 scaling:off origin:(0,0) degree:0" \ "id:4C9EEA9B-B97A-4CE3-8E8E-4B7F6F85B3F3 res:1920x1080 hz:60 color_depth:8 scaling:off origin:(2560,0) degree:0" EOF cat > ~/display-profiles/presentation.sh << 'EOF' #!/bin/bash displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230+4C9EEA9B-B97A-4CE3-8E8E-4B7F6F85B3F3 res:1920x1080 scaling:off origin:(0,0) degree:0" EOF # Use with hotkey tools (BetterTouchTool, Keyboard Maestro, etc.) ~/display-profiles/work.sh ``` -------------------------------- ### Mirror three displays Source: https://context7.com/jakehilborn/displayplacer/llms.txt Mirror three displays. The first display ID is considered the primary for optimization. Ensure all IDs are correct and the desired resolution and settings are applied. ```bash # Mirror three displays displayplacer "id:PRIMARY-UUID+MIRROR1-UUID+MIRROR2-UUID res:1920x1080 scaling:off origin:(0,0) degree:0" ``` -------------------------------- ### Mix Different Screen ID Types Source: https://context7.com/jakehilborn/displayplacer/llms.txt Combine different screen identifier types (persistent, serial) in a single command to configure multiple displays. Ensure correct IDs and configurations are used for each display. ```bash # Mix different ID types in one command displayplacer \ "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 res:2560x1440 scaling:off origin:(0,0) degree:0" \ "id:s410536788 res:1920x1080 scaling:off origin:(2560,0) degree:0" ``` -------------------------------- ### Set display resolution and refresh rate Source: https://context7.com/jakehilborn/displayplacer/llms.txt Configure display resolution with optional refresh rate and color depth settings. You can specify all parameters, use optional parameters (highest values auto-selected), or use a specific display mode number. ```bash # Set resolution with all parameters displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 res:2560x1440 hz:60 color_depth:8 scaling:off origin:(0,0) degree:0" ``` ```bash # Set resolution (hz and color_depth are optional - highest values auto-selected) displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 res:1920x1080 scaling:off origin:(0,0) degree:0" ``` ```bash # Use a specific display mode number from 'displayplacer list' output displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 mode:2 origin:(0,0) degree:0" ``` ```bash # Configure single screen (screenId optional if only one display connected) displayplacer "res:1920x1080 scaling:on origin:(0,0) degree:0" ``` -------------------------------- ### Use Older Output Format for List Command Source: https://github.com/jakehilborn/displayplacer/blob/master/README.md If scripts are broken due to changes in the `displayplacer list` output format since v1.4.0, use this flag to revert to the older format. ```bash displayplacer list --v1.3.0 ``` -------------------------------- ### Re-enable a disabled display Source: https://context7.com/jakehilborn/displayplacer/llms.txt Re-enable a display that was previously disabled. This command will turn the screen back on and restore its previous configuration. ```bash # Re-enable a disabled display displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 enabled:true" ``` -------------------------------- ### Rotate external display to portrait mode Source: https://context7.com/jakehilborn/displayplacer/llms.txt Rotate an external display by 90 degrees to achieve portrait mode. The resolution should be adjusted accordingly (e.g., width becomes height and vice versa). ```bash # Rotate external display 90 degrees (portrait mode) displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 res:1440x2560 scaling:off origin:(0,0) degree:90" ``` -------------------------------- ### Disable a Screen Source: https://github.com/jakehilborn/displayplacer/blob/master/README.md Turn off a specific screen by setting its 'enabled' property to false. The screen may need to be unplugged and replugged to be re-enabled. ```bash displayplacer "id: enabled:false" ``` -------------------------------- ### Disable Secondary Display Source: https://context7.com/jakehilborn/displayplacer/llms.txt Use this command to disable a secondary display while configuring the primary one. Replace SECONDARY-UUID with the actual ID of the display to disable. ```bash displayplacer \ "id:PRIMARY-UUID res:2560x1440 scaling:off origin:(0,0) degree:0" \ "id:SECONDARY-UUID enabled:false" ``` -------------------------------- ### Rotate Internal MacBook Screen Source: https://github.com/jakehilborn/displayplacer/blob/master/README.md Execute this command to rotate the internal MacBook screen. Ensure you use the correct screen ID for your MacBook display. ```bash displayplacer "id: degree:<0/90/180/270>" ``` -------------------------------- ### Disable a display Source: https://context7.com/jakehilborn/displayplacer/llms.txt Disable a connected display, effectively turning its screen black while keeping it recognized as connected by the system. This is useful for temporarily turning off external monitors. ```bash # Disable a display (turns screen black but keeps connected) displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 enabled:false" ``` -------------------------------- ### Rotate display to 180 degrees Source: https://context7.com/jakehilborn/displayplacer/llms.txt Rotate a display to 180 degrees (upside down). This can be achieved by specifying the degree value or by selecting a specific mode number from the 'list' command output. ```bash # Rotate to 180 degrees (upside down) displayplacer "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 mode:5 origin:(0,0) degree:180" ``` -------------------------------- ### Rotate internal MacBook screen Source: https://context7.com/jakehilborn/displayplacer/llms.txt Rotate the internal MacBook screen. Note that this operation may require a reboot to take effect. Supported rotation values are 0, 90, 180, and 270 degrees. ```bash # Rotate internal MacBook screen (may require reboot) displayplacer "id:BUILT-IN-UUID degree:90" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.