This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct MacParams { | |
var type: String | |
var isArm: Bool | |
var hasBuiltIn: Bool | |
var builtInSizeInch: Float | |
var pixelsWide: Int | |
var pixelsHigh: Int | |
var hiDPI: Bool | |
var clamshell: Bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ddcavcontrol | |
-- v1.2.1 | |
-- This Hammerspoon script is intended to do the following: | |
-- 1) Control External Display Brightness via DDC (utilizing a proper brightness+contrast curve) | |
-- 2) Control External Display Volume via DDC | |
-- 3) Control Digital AV Volume via Network (currently works with Yamaha AVs) | |
-- 4) Use the standard brightness and volume keys of an Apple keyboards | |
-- 5) Display the standard MacOS OSD as expected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import Darwin; | |
@import Foundation; | |
@import IOKit; | |
/******* | |
This should change the brightness level of a single external display connected to an M1 MBP or MBA relative to the current setting using DDC/CI. Reportedly does not work on M1 Mini. | |
Credits to @tao-j and @alin23 | |
Compile: |