mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
62
EXAMPLES.md
62
EXAMPLES.md
@ -3784,6 +3784,68 @@ cat cd_catalog.xml | jc --xml -p
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
### xrandr
|
||||||
|
```bash
|
||||||
|
$ xrandr | jc --xrandr -p # or jc -p xrandr
|
||||||
|
```
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"screens": [
|
||||||
|
{
|
||||||
|
"screen_number": 0,
|
||||||
|
"minimum_width": 8,
|
||||||
|
"minimum_height": 8,
|
||||||
|
"current_width": 1920,
|
||||||
|
"current_height": 1080,
|
||||||
|
"maximum_width": 32767,
|
||||||
|
"maximum_height": 32767,
|
||||||
|
"associated_device": {
|
||||||
|
"associated_modes": [
|
||||||
|
{
|
||||||
|
"resolution_width": 1920,
|
||||||
|
"resolution_height": 1080,
|
||||||
|
"is_high_resolution": false,
|
||||||
|
"frequencies": [
|
||||||
|
{
|
||||||
|
"frequency": 60.03,
|
||||||
|
"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_preferred": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"is_connected": true,
|
||||||
|
"is_primary": true,
|
||||||
|
"device_name": "eDP1",
|
||||||
|
"resolution_width": 1920,
|
||||||
|
"resolution_height": 1080,
|
||||||
|
"offset_width": 0,
|
||||||
|
"offset_height": 0,
|
||||||
|
"dimension_width": 310,
|
||||||
|
"dimension_height": 170
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"unassociated_devices": []
|
||||||
|
}
|
||||||
|
```
|
||||||
### YAML files
|
### YAML files
|
||||||
```bash
|
```bash
|
||||||
cat istio.yaml
|
cat istio.yaml
|
||||||
|
@ -36,18 +36,21 @@ Schema:
|
|||||||
"maximum_width": integer,
|
"maximum_width": integer,
|
||||||
"maximum_height": integer,
|
"maximum_height": integer,
|
||||||
"associated_device": {
|
"associated_device": {
|
||||||
"associated_modes": [
|
"associated_modes": [
|
||||||
{
|
|
||||||
"resolution_width": integer,
|
|
||||||
"resolution_height": integer,
|
|
||||||
"is_high_resolution": boolean,
|
|
||||||
"frequencies": [
|
|
||||||
{
|
{
|
||||||
"frequency": float,
|
"resolution_width": integer,
|
||||||
"is_current": boolean,
|
"resolution_height": integer,
|
||||||
"is_preferred": boolean
|
"is_high_resolution": boolean,
|
||||||
|
"frequencies": [
|
||||||
|
{
|
||||||
|
"frequency": float,
|
||||||
|
"is_current": boolean,
|
||||||
|
"is_preferred": boolean
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
|
},
|
||||||
"is_connected": boolean,
|
"is_connected": boolean,
|
||||||
"is_primary": boolean,
|
"is_primary": boolean,
|
||||||
"device_name": string,
|
"device_name": string,
|
||||||
@ -57,7 +60,6 @@ Schema:
|
|||||||
"offset_height": integer,
|
"offset_height": integer,
|
||||||
"dimension_width": integer,
|
"dimension_width": integer,
|
||||||
"dimension_height": integer
|
"dimension_height": integer
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"unassociated_devices": [
|
"unassociated_devices": [
|
||||||
|
@ -31,18 +31,21 @@ Schema:
|
|||||||
"maximum_width": integer,
|
"maximum_width": integer,
|
||||||
"maximum_height": integer,
|
"maximum_height": integer,
|
||||||
"associated_device": {
|
"associated_device": {
|
||||||
"associated_modes": [
|
"associated_modes": [
|
||||||
{
|
|
||||||
"resolution_width": integer,
|
|
||||||
"resolution_height": integer,
|
|
||||||
"is_high_resolution": boolean,
|
|
||||||
"frequencies": [
|
|
||||||
{
|
{
|
||||||
"frequency": float,
|
"resolution_width": integer,
|
||||||
"is_current": boolean,
|
"resolution_height": integer,
|
||||||
"is_preferred": boolean
|
"is_high_resolution": boolean,
|
||||||
|
"frequencies": [
|
||||||
|
{
|
||||||
|
"frequency": float,
|
||||||
|
"is_current": boolean,
|
||||||
|
"is_preferred": boolean
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
|
},
|
||||||
"is_connected": boolean,
|
"is_connected": boolean,
|
||||||
"is_primary": boolean,
|
"is_primary": boolean,
|
||||||
"device_name": string,
|
"device_name": string,
|
||||||
@ -52,7 +55,6 @@ Schema:
|
|||||||
"offset_height": integer,
|
"offset_height": integer,
|
||||||
"dimension_width": integer,
|
"dimension_width": integer,
|
||||||
"dimension_height": integer
|
"dimension_height": integer
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"unassociated_devices": [
|
"unassociated_devices": [
|
||||||
@ -137,7 +139,6 @@ Examples:
|
|||||||
"""
|
"""
|
||||||
import re
|
import re
|
||||||
from typing import Dict, List, Optional, Union
|
from typing import Dict, List, Optional, Union
|
||||||
|
|
||||||
import jc.utils
|
import jc.utils
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user