Git Product home page Git Product logo

displayplacer_wrapper's Introduction

displayplacer wrapper

Have you ever plugged your Macbook Pro into your usb-c dock only to realize that your screens have been swapped? It is time consuming to reset the display arrangement when you have multiple external monitors which are set in different orientations.

This repository contains a wrapper script and two Quick Actions which interact with displayplacer to reset your display arrangement to a desired configuration.

The quick actions can be added to a Macbook Pro's Touch Bar control strip which allows you to reset your display arrangement with only a few taps on the Touch Bar.

Setup

Prerequisites

Homebrew must be installed on your machine prior to using this wrapper script.

Installation

Run the following commands below, replacing <user> with a real user name.

cd ~
git clone [email protected]:njtman/displayplacer_wrapper.git
ln -s /Users/<user>/displayplacer_wrapper/displayplacer_wrapper /usr/local/bin/displayplacer_wrapper

Note - Ensure that /usr/local/bin/ is added to your PATH variable so invocations to displayplacer_wrapper can successfully execute.

How to use

Quick actions

This repository contains two Quick Actions to make interactions with the wrapper script more convenient.

Double click on fix_displays.workflow and save_display_arrangement.workflow to install the two Quick Actions.

Perform the following steps to make the newly installed Quick Actions available on the Touch Bar:

  1. Open the macOS Settings app
  2. Click Keyboard
  3. Click Customize Control Strip...
  4. Drag the Quick Actions icon down to the Touch Bar.

Save display arragement and Fix displays will now be visible on the Touch Bar after tapping the Quick Actions icon.

Save display arrangement

This Quick Action will persist the current display arrangement to a configuration file located in $HOME/.displayplacer.cfg.

This Quick Action must be run at least once before running Fix displays.

Fix displays

This Quick Action will set the display arrangement using the previously persisted values from running the Save display arragement.

It is normal for the display to go blank for a couple of seconds while setting the display arrangement.

CLI

If you prefer interacting with the wrapper script using the CLI, continue reading below.

Saving the current display arrangement

  1. Navigate to the Settingsapp in macOS, then click Displays, and go to the Arrangement tab. Configure the displays to a desired configuration.
  2. Open the Terminal app and type in displayplacer_wrapper save. This will persist the current display arrangement to a configuration file located in $HOME/.displayplacer.cfg.

Applying the previously saved display arragement

  1. Open the Terminal app and type in displayplacer_wrapper apply.

displayplacer_wrapper's People

Contributors

njtman avatar

Stargazers

Aaron Culich avatar

Watchers

James Cloos avatar  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.