GithubHelp home page GithubHelp logo

sushobhit-lt / displayplacer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jakehilborn/displayplacer

0.0 1.0 0.0 141 KB

macOS command line utility to configure multi-display resolutions and arrangements. Essentially XRandR for macOS.

License: MIT License

C 99.38% Makefile 0.62%

displayplacer's Introduction

displayplacer

macOS command line utility to configure multi-display resolutions and arrangements. Essentially XRandR for macOS.

Install via Homebrew with brew tap jakehilborn/jakehilborn && brew install displayplacer or visit the releases tab.

Usage:

Show current screen info and possible resolutions: displayplacer list

Apply screen config (hz & color_depth are optional): displayplacer "id:<screenId> res:<width>x<height> hz:<num> color_depth:<num> scaling:<on/off> origin:(<x>,<y>) degree:<0/90/180/270>"

Apply screen config using mode: displayplacer "id:<screenId> mode:<modeNum> origin:(<x>,<y>) degree:<0/90/180/270>"

Apply screen config with mirrored screens: displayplacer "id:<mainScreenId>+<1stMirrorScreenId>+<2ndMirrorScreenId> res:<width>x<height> scaling:<on/off> origin:(<x>,<y>) degree:<0/90/180/270>"

Example w/ all features: displayplacer "id:18173D22-3EC6-E735-EEB4-B003BF681F30+F466F621-B5FA-04A0-0800-CFA6C258DECD res:1440x900 scaling:on origin:(0,0) degree:0" "id:4C405A05-8798-553B-3550-F93E7A7722BB res:768x1360 hz:60 color_depth:8 scaling:off origin:(1440,0) degree:90" "id:A46D2F5E-487B-CC69-C588-ECFD519016E5 mode:3 origin:(-1440,0) degree:270"

Instructions:

  1. Manually set rotations 1st*, resolutions 2nd, and arrangement 3rd. For extra resolutions and rotations read 'Notes' below.
    • Open System Preferences -> Displays
    • Choose desired screen rotations (use displayplacer for rotating internal MacBook screen).
    • Choose desired resolutions (use displayplacer for extra resolutions).
    • Drag the white bar to your desired primary screen.
    • Arrange screens as desired and/or enable mirroring. To enable partial mirroring hold the alt/option key and drag a display on top of another.
  2. Use displayplacer list to print your current layout's args so you can create profiles for scripting/hotkeys with Automator, BetterTouchTool, etc.

Notes:

  • *displayplacer list and system prefs only show resolutions for the screen's current rotation.
  • Use an extra resolution shown in displayplacer list by executing displayplacer "id:<screenId> mode:<modeNum>"
  • Rotate your internal MacBook screen by executing displayplacer "id:<screenId> degree:<0/90/180/270>"
  • The screen set to origin (0,0) will be set as the primary screen (white bar in system prefs).
  • The first screenId in a mirroring set will be the 'Optimize for' screen in the system prefs. You can only choose resolutions for the 'Optimize for' screen. If there is a mirroring resolution you need but cannot find, try making a different screenId the first of the set.
  • hz and color_depth are optional. If left out, the highest hz and then the highest color_depth will be auto applied.
  • Persistent screen ids always stay the same. Contextual screen ids change when switching GPUs or when switching ports. It's recommended to use persistent screen ids. In some rare cases, you may need to use contextual screen ids since the modes list changes when macOS switches GPUs.

Feedback:

Please create a GitHub Issue for any feedback, feature requests, bugs, Homebrew issues, etc. Happy to accept pull requests too!

displayplacer's People

Contributors

jakehilborn avatar andy-vacasa avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.