Skip to content

Instantly share code, notes, and snippets.

@nacookan
Last active August 18, 2020 18:20
Show Gist options
  • Save nacookan/c41b20a35eb8b4b46e6491684b06f742 to your computer and use it in GitHub Desktop.
Save nacookan/c41b20a35eb8b4b46e6491684b06f742 to your computer and use it in GitHub Desktop.
Macの解像度を変更するコマンド(Display Menu Proが必要)
#! /usr/bin/env osascript -l JavaScript
var display = 'Color LCD';
var reso = '1792x1120';
var rate = '60.0 Hz';
var retina = true;
var params = [reso, rate, (retina ? 'Retina' : 'non-Retina')]
Application('Display Menu').selectResolution(
params.join(' '),
{ onDisplay: display }
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment