aboutsummaryrefslogtreecommitdiff
path: root/swaymsg/main.c
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2025-01-27 21:00:54 +0100
committerFurkan Sahin <furkan-dev@proton.me>2025-01-27 21:00:54 +0100
commit3477c76ff9e8e20f8288cba7a0b8a911b9aa493b (patch)
treebb8b01028ff77f8a32284f6153afb8e10aa6ceed /swaymsg/main.c
parente696b964d22e1c760d66a2e1b96b49db22807c22 (diff)
Add support for HDR10 output
Diffstat (limited to 'swaymsg/main.c')
-rw-r--r--swaymsg/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c
index 9152b794..1c6e807c 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -189,7 +189,8 @@ static void pretty_print_output(json_object *o) {
json_object_object_get_ex(o, "current_workspace", &ws);
json_object_object_get_ex(o, "non_desktop", &non_desktop);
json_object *make, *model, *serial, *scale, *scale_filter, *subpixel,
- *transform, *max_render_time, *adaptive_sync_status, *allow_tearing;
+ *transform, *max_render_time, *adaptive_sync_status, *allow_tearing,
+ *hdr;
json_object_object_get_ex(o, "make", &make);
json_object_object_get_ex(o, "model", &model);
json_object_object_get_ex(o, "serial", &serial);
@@ -200,6 +201,7 @@ static void pretty_print_output(json_object *o) {
json_object_object_get_ex(o, "max_render_time", &max_render_time);
json_object_object_get_ex(o, "adaptive_sync_status", &adaptive_sync_status);
json_object_object_get_ex(o, "allow_tearing", &allow_tearing);
+ json_object_object_get_ex(o, "hdr", &hdr);
json_object *x, *y;
json_object_object_get_ex(rect, "x", &x);
json_object_object_get_ex(rect, "y", &y);
@@ -261,6 +263,7 @@ static void pretty_print_output(json_object *o) {
printf(" Allow tearing: %s\n",
json_object_get_boolean(allow_tearing) ? "yes" : "no");
+ printf(" HDR: %s\n", json_object_get_boolean(hdr) ? "on" : "off");
} else {
printf(
"Output %s '%s %s %s' (disabled)\n",