Skip to content

Instantly share code, notes, and snippets.

@Josasp
Josasp / edit_display.sh
Created January 14, 2022 10:37
Run with "sudo bash edit_display.sh" from Terminal. Requires VS Code installed.
#!/bin/bash
cd /Library/Preferences
BACKUP_NAME=com.apple.windowserver.displays_$(date +%F-%H_%M).plist
echo "Backing up plist to $BACKUP_NAME"
cp com.apple.windowserver.displays.plist $BACKUP_NAME
open_xml () {
echo "Converting plist to XML..."
plutil -convert xml1 com.apple.windowserver.displays.plist