mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
Merge pull request #547 from lyterk/xrandr_fix_schema
[xrandr] Add props schema
This commit is contained in:
@ -15,7 +15,6 @@ Usage (module):
|
|||||||
result = jc.parse('xrandr', xrandr_command_output)
|
result = jc.parse('xrandr', xrandr_command_output)
|
||||||
|
|
||||||
Schema:
|
Schema:
|
||||||
|
|
||||||
{
|
{
|
||||||
"screens": [
|
"screens": [
|
||||||
{
|
{
|
||||||
@ -28,6 +27,16 @@ Schema:
|
|||||||
"maximum_height": integer,
|
"maximum_height": integer,
|
||||||
"devices": [
|
"devices": [
|
||||||
{
|
{
|
||||||
|
"props": {
|
||||||
|
[name: string]: {
|
||||||
|
// Represents EdidModel
|
||||||
|
"name": string,
|
||||||
|
"product_id": string,
|
||||||
|
"serial_number": string,
|
||||||
|
}
|
||||||
|
|
|
||||||
|
list[string]
|
||||||
|
},
|
||||||
"resolution_modes": [
|
"resolution_modes": [
|
||||||
{
|
{
|
||||||
"resolution_width": integer,
|
"resolution_width": integer,
|
||||||
@ -87,26 +96,9 @@ Examples:
|
|||||||
"frequency": 60.03,
|
"frequency": 60.03,
|
||||||
"is_current": true,
|
"is_current": true,
|
||||||
"is_preferred": true
|
"is_preferred": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"frequency": 59.93,
|
|
||||||
"is_current": false,
|
|
||||||
"is_preferred": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"resolution_width": 1680,
|
|
||||||
"resolution_height": 1050,
|
|
||||||
"is_high_resolution": false,
|
|
||||||
"frequencies": [
|
|
||||||
{
|
|
||||||
"frequency": 59.88,
|
|
||||||
"is_current": false,
|
|
||||||
"is_preferred": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"is_connected": true,
|
"is_connected": true,
|
||||||
"is_primary": true,
|
"is_primary": true,
|
||||||
@ -129,40 +121,41 @@ Examples:
|
|||||||
{
|
{
|
||||||
"screens": [
|
"screens": [
|
||||||
{
|
{
|
||||||
"screen_number": 0,
|
|
||||||
"minimum_width": 8,
|
|
||||||
"minimum_height": 8,
|
|
||||||
"current_width": 1920,
|
|
||||||
"current_height": 1080,
|
|
||||||
"maximum_width": 32767,
|
|
||||||
"maximum_height": 32767,
|
|
||||||
"devices": [
|
"devices": [
|
||||||
{
|
{
|
||||||
|
"props": {
|
||||||
|
"EDID": [
|
||||||
|
"00ffff5700000000",
|
||||||
|
"001c01a5544d9a27",
|
||||||
|
"0e50540101010101",
|
||||||
|
"010101383e401010",
|
||||||
|
"3500350f00000000",
|
||||||
|
"0000000000fe0041",
|
||||||
|
"554f0a20000000fe",
|
||||||
|
"00423137200a0070"
|
||||||
|
],
|
||||||
|
"scaling mode": [
|
||||||
|
"Full aspect ",
|
||||||
|
"supported: Full, Center, Full aspect"
|
||||||
|
],
|
||||||
|
"Colorspace": [
|
||||||
|
"Default ",
|
||||||
|
"supported: Default, RGB_Wide_Gamut_Fixed_Point, RGB_Wide_Gamut_Floating_Point, opRGB, DCI-P3_RGB_D65, BT2020_RGB, BT601_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, BT2020_CYCC, BT2020_YCC"
|
||||||
|
],
|
||||||
|
"EdidModel": {
|
||||||
|
"name": "Generic",
|
||||||
|
"product_id": "22333",
|
||||||
|
"serial_number": "0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"resolution_modes": [
|
"resolution_modes": [
|
||||||
{
|
{
|
||||||
"resolution_width": 1920,
|
"resolution_width": 320,
|
||||||
"resolution_height": 1080,
|
"resolution_height": 180,
|
||||||
"is_high_resolution": false,
|
"is_high_resolution": false,
|
||||||
"frequencies": [
|
"frequencies": [
|
||||||
{
|
{
|
||||||
"frequency": 60.03,
|
"frequency": 59.84,
|
||||||
"is_current": true,
|
|
||||||
"is_preferred": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"frequency": 59.93,
|
|
||||||
"is_current": false,
|
|
||||||
"is_preferred": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resolution_width": 1680,
|
|
||||||
"resolution_height": 1050,
|
|
||||||
"is_high_resolution": false,
|
|
||||||
"frequencies": [
|
|
||||||
{
|
|
||||||
"frequency": 59.88,
|
|
||||||
"is_current": false,
|
"is_current": false,
|
||||||
"is_preferred": false
|
"is_preferred": false
|
||||||
}
|
}
|
||||||
@ -171,20 +164,24 @@ Examples:
|
|||||||
],
|
],
|
||||||
"is_connected": true,
|
"is_connected": true,
|
||||||
"is_primary": true,
|
"is_primary": true,
|
||||||
"device_name": "eDP1",
|
"device_name": "eDP-1",
|
||||||
"model_name": "ASUS VW193S",
|
"rotation": "normal",
|
||||||
"product_id": "54297",
|
"reflection": "normal",
|
||||||
"serial_number": "78L8021107",
|
|
||||||
"resolution_width": 1920,
|
"resolution_width": 1920,
|
||||||
"resolution_height": 1080,
|
"resolution_height": 1080,
|
||||||
"offset_width": 0,
|
"offset_width": 0,
|
||||||
"offset_height": 0,
|
"offset_height": 0,
|
||||||
"dimension_width": 310,
|
"dimension_width": 309,
|
||||||
"dimension_height": 170,
|
"dimension_height": 174
|
||||||
"rotation": "normal",
|
|
||||||
"reflection": "normal"
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"screen_number": 0,
|
||||||
|
"minimum_width": 320,
|
||||||
|
"minimum_height": 200,
|
||||||
|
"current_width": 1920,
|
||||||
|
"current_height": 1080,
|
||||||
|
"maximum_width": 16384,
|
||||||
|
"maximum_height": 16384
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user