diff options
author | Reza Jelveh <[email protected]> | 2024-04-15 13:39:41 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-15 01:39:41 -0400 |
commit | fb86ed6b0588dfdebfb66ce875bc63cfa0a897f6 (patch) | |
tree | 29857a1769107adc58696f08d379f608aa4e29a2 /swaymsg | |
parent | a5e79676c4bd22fc5902182acf0667907202a465 (diff) |
feat: 1.9 merge (#277)
Co-authored-by: William McKinnon <[email protected]>
Co-authored-by: Erik Reider <[email protected]>
Diffstat (limited to 'swaymsg')
-rw-r--r-- | swaymsg/main.c | 9 | ||||
-rw-r--r-- | swaymsg/swaymsg.1.scd | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index 237a4a71..f408307e 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c @@ -60,7 +60,7 @@ static void pretty_print_cmd(json_object *r) { if (!success_object(r)) { json_object *error; if (!json_object_object_get_ex(r, "error", &error)) { - printf("An unknkown error occurred"); + printf("An unknown error occurred"); } else { printf("Error: %s\n", json_object_get_string(error)); } @@ -185,11 +185,12 @@ static void pretty_print_seat(json_object *i) { } static void pretty_print_output(json_object *o) { - json_object *name, *rect, *focused, *active, *ws, *current_mode, *non_desktop; + json_object *name, *rect, *focused, *active, *power, *ws, *current_mode, *non_desktop; json_object_object_get_ex(o, "name", &name); json_object_object_get_ex(o, "rect", &rect); json_object_object_get_ex(o, "focused", &focused); json_object_object_get_ex(o, "active", &active); + json_object_object_get_ex(o, "power", &power); 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, @@ -226,6 +227,7 @@ static void pretty_print_output(json_object *o) { printf( "Output %s '%s %s %s'%s\n" " Current mode: %dx%d @ %.3f Hz\n" + " Power: %s\n" " Position: %d,%d\n" " Scale factor: %f\n" " Scale filter: %s\n" @@ -240,6 +242,7 @@ static void pretty_print_output(json_object *o) { json_object_get_int(width), json_object_get_int(height), (double)json_object_get_int(refresh) / 1000, + json_object_get_boolean(power) ? "on" : "off", json_object_get_int(x), json_object_get_int(y), json_object_get_double(scale), json_object_get_string(scale_filter), @@ -256,7 +259,7 @@ static void pretty_print_output(json_object *o) { json_object_get_string(adaptive_sync_status)); } else { printf( - "Output %s '%s %s %s' (inactive)\n", + "Output %s '%s %s %s' (disabled)\n", json_object_get_string(name), json_object_get_string(make), json_object_get_string(model), diff --git a/swaymsg/swaymsg.1.scd b/swaymsg/swaymsg.1.scd index 24a9d6c9..abee1bb9 100644 --- a/swaymsg/swaymsg.1.scd +++ b/swaymsg/swaymsg.1.scd @@ -107,6 +107,8 @@ _swaymsg_ [options...] [message] Subscribe to a list of event types. The argument for this type should be provided in the form of a valid JSON array. If any of the types are invalid or if a valid JSON array is not provided, this will result in a failure. + For a list of valid event types and the data returned with them refer to + *sway-ipc*(7). # RETURN CODES |