hammerspoon icon indicating copy to clipboard operation
hammerspoon copied to clipboard

hs.screen.getInfo() always returns nil?

Open von opened this issue 1 year ago • 2 comments

I've never seen hs.screen.getInfo() return anything but nil, e.g.

> hs.fnutils.each(hs.screen.allScreens(), function(s) hs.printf(hs.inspect(s:getInfo())) end)
2024-09-28 16:39:36: nil

von avatar Sep 28 '24 22:09 von

FWIW, it does work for me with an external Dell display on a Mac mini x86:

hs.fnutils.each(hs.screen.allScreens(), function(s) hs.printf(hs.inspect(s:getInfo())) end)
 
{
  DisplayBluePointX = 0.150390625,
  DisplayBluePointY = 0.0595703125,
  DisplayBrightnessAffectsGamma = true,
  DisplayGreenPointX = 0.2998046875,
  DisplayGreenPointY = 0.599609375,
  DisplayHorizontalImageSize = 800,
  DisplayProductID = 41210,
  DisplayProductName = {
    en_US = "Dell AW3418DW"
  },
  DisplayRedPointX = 0.6396484375,
  DisplayRedPointY = 0.330078125,
  DisplaySerialNumber = <removed>,
  DisplayVendorID = 4268,
  DisplayVerticalImageSize = 340,
  DisplayWeekManufacture = 35,
  DisplayWhiteGamma = 2.2000000476837,
  DisplayWhitePointX = 0.3125,
  DisplayWhitePointY = 0.3291015625,
  DisplayYearManufacture = 2017,
  IODisplayAttributes = "gatvsglfrloccdg???glfd",
  IODisplayConnectFlags = "",
  IODisplayEDID = '<removed_binary_stuff>',
  IODisplayIsDigital = true,
  IODisplayIsHDMISink = false,
  IODisplayLocation = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@0/display0/AppleDisplay",
  IODisplayPrefsKey = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2-10ac-a0fa-b98355869664b9b",
  IODisplayVSDB4B0400 = "",
  IOFBTransform = 0,

QuantumLibet avatar Sep 29 '24 19:09 QuantumLibet

Thanks @QuantumLibet, I'll dig a little further.

von avatar Sep 29 '24 20:09 von