Skip to content

ktym/displaywatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DisplayWatcher

DisplayWatcher automatically monitors display connection changes on macOS and applies your custom displayplacer configuration instantly.

DisplayWatcher Icon

Motivation

Every time I connect a new external display, macOS automatically changes the resolution of the built-in display, which is quite annoying. I wanted to detect display connection events and automatically restore the built-in display to my preferred resolution.

Features

  • Real-time external monitor detection via IOKit
  • Automatically applies your preferred resolution using displayplacer
  • Native macOS app bundle (/Applications/DisplayWatcher.app)
  • Auto-starts on login (Login Items)

Requirements

  • macOS Monterey (12.0) or later
  • Homebrew (https://brew.sh/)
  • displayplacer (installed automatically)

Installation

  1. Clone this repository:
git clone https://github.com/ktym/displaywatcher.git
cd displaywatcher
  1. Build the app:
./build.sh
  1. Install:
./install.sh
  1. Edit your configuration:
~/Library/Application Support/DisplayWatcher/displaywatcher.conf

To generate your desired display configuration, manually adjust your displays, then run:

displayplacer list | grep '^displayplacer "id:'

Copy the output into displaywatcher.conf.

Notes

The installer will automatically build DisplayWatcher.app and register it as a Login Item for auto-start. You can modify the displayplacer command anytime to adjust your desired resolution.

Author

  • Toshiaki Katayama (@ktym)
  • ChatGPT

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published