summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-11-26 16:49:36 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-11-26 16:49:36 -0500
commit53d353e6b47e4c89ed7ad028ed756fec1d793743 (patch)
treee653c541c62f697190abca83b6fa96817efc1e0d /sway
parentAdd swaymsg(1) man page (diff)
downloadsway-53d353e6b47e4c89ed7ad028ed756fec1d793743.tar.gz
sway-53d353e6b47e4c89ed7ad028ed756fec1d793743.tar.zst
sway-53d353e6b47e4c89ed7ad028ed756fec1d793743.zip
Add "variant": "sway" to IPC version response
Diffstat (limited to 'sway')
-rw-r--r--sway/ipc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sway/ipc.c b/sway/ipc.c
index 7ff0df01..e004aff1 100644
--- a/sway/ipc.c
+++ b/sway/ipc.c
@@ -67,12 +67,8 @@ void ipc_init(void) {
67 } 67 }
68 68
69 // Set i3 IPC socket path so that i3-msg works out of the box 69 // Set i3 IPC socket path so that i3-msg works out of the box
70 if (!getenv("I3SOCK")) { 70 setenv("I3SOCK", ipc_sockaddr->sun_path, 1);
71 setenv("I3SOCK", ipc_sockaddr->sun_path, 1); 71 setenv("SWAYSOCK", ipc_sockaddr->sun_path, 1);
72 }
73 if (!getenv("SWAYSOCK")) {
74 setenv("SWAYSOCK", ipc_sockaddr->sun_path, 1);
75 }
76 72
77 ipc_client_list = create_list(); 73 ipc_client_list = create_list();
78 74
@@ -339,6 +335,7 @@ void ipc_client_handle_command(struct ipc_client *client) {
339 strcat(full_version, "\")"); 335 strcat(full_version, "\")");
340 json_object *json = json_object_new_object(); 336 json_object *json = json_object_new_object();
341 json_object_object_add(json, "human_readable", json_object_new_string(full_version)); 337 json_object_object_add(json, "human_readable", json_object_new_string(full_version));
338 json_object_object_add(json, "variant", json_object_new_string("sway"));
342 // Todo once we actually release a version 339 // Todo once we actually release a version
343 json_object_object_add(json, "major", json_object_new_int(0)); 340 json_object_object_add(json, "major", json_object_new_int(0));
344 json_object_object_add(json, "minor", json_object_new_int(0)); 341 json_object_object_add(json, "minor", json_object_new_int(0));