diff options
author | 2018-01-04 08:00:22 -0500 | |
---|---|---|
committer | 2018-01-04 08:00:22 -0500 | |
commit | b01a53abfb883f8767090415f1ec37b295b35146 (patch) | |
tree | 8381c59d4dce5595d923fed9b221640115b84682 /swaymsg | |
parent | cleanup bindings (diff) | |
parent | Merge pull request #1546 from 4e554c4c/wlr_logs (diff) | |
download | sway-b01a53abfb883f8767090415f1ec37b295b35146.tar.gz sway-b01a53abfb883f8767090415f1ec37b295b35146.tar.zst sway-b01a53abfb883f8767090415f1ec37b295b35146.zip |
Merge branch 'wlroots' into bindings
Diffstat (limited to 'swaymsg')
-rw-r--r-- | swaymsg/main.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index b431872a..8a720fca 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -107,29 +107,42 @@ static void pretty_print_input(json_object *i) { | |||
107 | } | 107 | } |
108 | 108 | ||
109 | static void pretty_print_output(json_object *o) { | 109 | static void pretty_print_output(json_object *o) { |
110 | json_object *name, *rect, *focused, *active, *ws, *scale; | 110 | json_object *name, *rect, *focused, *active, *ws; |
111 | json_object_object_get_ex(o, "name", &name); | 111 | json_object_object_get_ex(o, "name", &name); |
112 | json_object_object_get_ex(o, "rect", &rect); | 112 | json_object_object_get_ex(o, "rect", &rect); |
113 | json_object_object_get_ex(o, "focused", &focused); | 113 | json_object_object_get_ex(o, "focused", &focused); |
114 | json_object_object_get_ex(o, "active", &active); | 114 | json_object_object_get_ex(o, "active", &active); |
115 | json_object_object_get_ex(o, "current_workspace", &ws); | 115 | json_object_object_get_ex(o, "current_workspace", &ws); |
116 | json_object *make, *model, *serial, *scale, *refresh, *transform; | ||
117 | json_object_object_get_ex(o, "make", &make); | ||
118 | json_object_object_get_ex(o, "model", &model); | ||
119 | json_object_object_get_ex(o, "serial", &serial); | ||
116 | json_object_object_get_ex(o, "scale", &scale); | 120 | json_object_object_get_ex(o, "scale", &scale); |
121 | json_object_object_get_ex(o, "refresh", &refresh); | ||
122 | json_object_object_get_ex(o, "transform", &transform); | ||
117 | json_object *x, *y, *width, *height; | 123 | json_object *x, *y, *width, *height; |
118 | json_object_object_get_ex(rect, "x", &x); | 124 | json_object_object_get_ex(rect, "x", &x); |
119 | json_object_object_get_ex(rect, "y", &y); | 125 | json_object_object_get_ex(rect, "y", &y); |
120 | json_object_object_get_ex(rect, "width", &width); | 126 | json_object_object_get_ex(rect, "width", &width); |
121 | json_object_object_get_ex(rect, "height", &height); | 127 | json_object_object_get_ex(rect, "height", &height); |
122 | printf( | 128 | printf( |
123 | "Output %s%s%s\n" | 129 | "Output %s '%s %s %s'%s%s\n" |
124 | " Geometry: %dx%d @ %d,%d\n" | 130 | " Mode: %dx%d @ %f Hz\n" |
131 | " Position: %d,%d\n" | ||
125 | " Scale factor: %dx\n" | 132 | " Scale factor: %dx\n" |
133 | " Transform: %s\n" | ||
126 | " Workspace: %s\n\n", | 134 | " Workspace: %s\n\n", |
127 | json_object_get_string(name), | 135 | json_object_get_string(name), |
136 | json_object_get_string(make), | ||
137 | json_object_get_string(model), | ||
138 | json_object_get_string(serial), | ||
128 | json_object_get_boolean(focused) ? " (focused)" : "", | 139 | json_object_get_boolean(focused) ? " (focused)" : "", |
129 | !json_object_get_boolean(active) ? " (inactive)" : "", | 140 | !json_object_get_boolean(active) ? " (inactive)" : "", |
130 | json_object_get_int(width), json_object_get_int(height), | 141 | json_object_get_int(width), json_object_get_int(height), |
142 | (float)json_object_get_int(refresh) / 1000, | ||
131 | json_object_get_int(x), json_object_get_int(y), | 143 | json_object_get_int(x), json_object_get_int(y), |
132 | json_object_get_int(scale), | 144 | json_object_get_int(scale), |
145 | json_object_get_string(transform), | ||
133 | json_object_get_string(ws) | 146 | json_object_get_string(ws) |
134 | ); | 147 | ); |
135 | } | 148 | } |