gdctl: Show color mode
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192>
This commit is contained in:
parent
23ab763be0
commit
53ae155e03
@ -16,8 +16,8 @@ Monitors:
|
||||
│ ├──is-builtin ⇒ no
|
||||
│ ├──display-name ⇒ MetaProduct's Inc. 14"
|
||||
│ ├──is-for-lease ⇒ no
|
||||
│ ├──color-mode ⇒ 0
|
||||
│ └──supported-color-modes ⇒ [0]
|
||||
│ ├──color-mode ⇒ default
|
||||
│ └──supported-color-modes ⇒ [default]
|
||||
└──Monitor DP-2 (MetaProduct's Inc. 13")
|
||||
├──Vendor: MetaProduct's Inc.
|
||||
├──Product: MetaMonitor
|
||||
@ -35,8 +35,8 @@ Monitors:
|
||||
├──is-builtin ⇒ no
|
||||
├──display-name ⇒ MetaProduct's Inc. 13"
|
||||
├──is-for-lease ⇒ no
|
||||
├──color-mode ⇒ 0
|
||||
└──supported-color-modes ⇒ [0]
|
||||
├──color-mode ⇒ default
|
||||
└──supported-color-modes ⇒ [default]
|
||||
|
||||
Logical monitors:
|
||||
├──Logical monitor #1
|
||||
|
@ -34,8 +34,8 @@ Monitors:
|
||||
│ ├──is-builtin ⇒ no
|
||||
│ ├──display-name ⇒ MetaProduct's Inc. 14"
|
||||
│ ├──is-for-lease ⇒ no
|
||||
│ ├──color-mode ⇒ 0
|
||||
│ └──supported-color-modes ⇒ [0]
|
||||
│ ├──color-mode ⇒ default
|
||||
│ └──supported-color-modes ⇒ [default]
|
||||
└──Monitor DP-2 (MetaProduct's Inc. 13")
|
||||
├──Vendor: MetaProduct's Inc.
|
||||
├──Product: MetaMonitor
|
||||
@ -71,8 +71,8 @@ Monitors:
|
||||
├──is-builtin ⇒ no
|
||||
├──display-name ⇒ MetaProduct's Inc. 13"
|
||||
├──is-for-lease ⇒ no
|
||||
├──color-mode ⇒ 0
|
||||
└──supported-color-modes ⇒ [0]
|
||||
├──color-mode ⇒ default
|
||||
└──supported-color-modes ⇒ [default]
|
||||
|
||||
Logical monitors:
|
||||
├──Logical monitor #1
|
||||
|
14
tools/gdctl
14
tools/gdctl
@ -76,6 +76,18 @@ class LayoutMode(NamedEnum):
|
||||
]
|
||||
|
||||
|
||||
class ColorMode(NamedEnum):
|
||||
DEFAULT = 0
|
||||
BT2100 = 1
|
||||
|
||||
@classmethod
|
||||
def enum_names(cls):
|
||||
return [
|
||||
(ColorMode.DEFAULT, "default"),
|
||||
(ColorMode.BT2100, "bt2100"),
|
||||
]
|
||||
|
||||
|
||||
class ConfigMethod(Enum):
|
||||
VERIFY = 0
|
||||
TEMPORARY = 1
|
||||
@ -85,6 +97,8 @@ class ConfigMethod(Enum):
|
||||
def translate_property(name, value):
|
||||
enum_properties = {
|
||||
"layout-mode": LayoutMode,
|
||||
"color-mode": ColorMode,
|
||||
"supported-color-modes": ColorMode,
|
||||
}
|
||||
|
||||
if name in enum_properties:
|
||||
|
Loading…
x
Reference in New Issue
Block a user