Commit graph

29 commits

Author SHA1 Message Date
minus 9925554ea4 implemented IPC subscribe for workspace event 2015-10-27 21:59:17 +01:00
S. Christoffer Eliesen af30a1b67c ipc,commands,config: Replace cmd_status enum with cmd_results struct.
In i3 the ipc reply will contain a human readable error message, and
this patch replicates that behaviour.

However, that error message is also useful for logging, which this
patch takes advantage of.

E.g. instead of logging errors directly in commands.c/checkargs, it is
fed back to the caller which eventually ends up logging everything with
maximum context available (config.c/read_config).

So instead of logging e.g. "Error on line 'exit'" it will now log:
"Error on line 'exit': Can't execute from config."
2015-10-22 23:36:24 +02:00
S. Christoffer Eliesen 544c6c412a ipc: Return correct status in ipc reply. 2015-10-22 23:36:24 +02:00
S. Christoffer Eliesen 783290e81a sway/ipc: Use sway_abort instead of returning NULL. 2015-10-16 13:23:08 +02:00
S. Christoffer Eliesen 7cb0732030 sway/ipc: ipc_user_sockaddr: Use sway_assert instead of assert. 2015-10-16 13:07:50 +02:00
S. Christoffer Eliesen 382b4e425a sway/ipc: Fix whitespace. 2015-10-16 13:06:30 +02:00
S. Christoffer Eliesen 26beb66eb5 sway/ipc: Free ipc_sockaddr upon termination. 2015-10-16 12:16:18 +02:00
S. Christoffer Eliesen f94f8fde7e sway/ipc: Support multiple users. 2015-10-16 12:16:16 +02:00
S. Christoffer Eliesen ae93c6e6fe sway/ipc: Dynamically assign ipc_sockaddr. 2015-10-16 12:15:11 +02:00
taiyu c963aa7ced return after disconnect ipc client and minor checks 2015-09-29 07:19:10 -07:00
Drew DeVault e505abfe75 Revert "new_workspace null behavior + testmap functions + regex"
This reverts commit e1d18e42a8.

Fixes #180

cc @taiyu-len
2015-09-13 19:46:16 -04:00
taiyu e1d18e42a8 new_workspace null behavior + testmap functions + regex 2015-09-12 02:38:03 -07:00
taiyu 71af5b7dde config modes 2015-09-07 14:29:40 -07:00
Drew DeVault 930f42ae81 Remove stropts.h from ipc.c
Apparently it's not required, and for some reason Fedora doesn't have
it. Fixes #162
2015-09-02 07:37:41 -04:00
Luminarys 42de135c3a Added in better versioning info 2015-08-26 21:13:53 -05:00
minus 873a51f7e2 converted IPC to use json-c
get_workspaces and get_outputs
2015-08-27 00:41:07 +02:00
minus 2289029fab added json-c lib and implemented IPC get_version 2015-08-26 23:49:38 +02:00
minus 8dfaf6265b fixed #108 signed/unsigned comparison 2015-08-21 16:53:11 +02:00
Drew DeVault 0266b0666a Fix compiler warnings (which were really errors) 2015-08-21 07:15:00 -04:00
minus 754793aad4 added IPC messages get_workspaces and get_outputs
No escaping on container names is done yet, as well as some values are
hardcoded because they don't exist yet.
2015-08-20 21:13:01 +02:00
minus 4c56cd0ed6 set I3SOCK for i3-msg compatibility 2015-08-20 15:27:59 +02:00
minus 6ab968e63e fixed formatting 2015-08-20 15:27:59 +02:00
minus f26ed32e46 added sway_terminate to exit cleanly 2015-08-20 15:27:56 +02:00
minus 70f046c87a set IPC client sockets to close on exec 2015-08-20 15:24:33 +02:00
minus 91c0877264 properly exit sway
- wlc_terminate() instead of exit(0)
- unlink IPC socket
2015-08-20 15:24:33 +02:00
minus bfbadadf70 use env var SWAYSOCK if available
or fall back to /tmp/sway-ipc.sock
2015-08-20 15:24:33 +02:00
minus 773e85c681 properly handle IPC clients 2015-08-20 15:24:33 +02:00
minus 5d99215469 added i3-ipc support/parsing 2015-08-20 15:24:33 +02:00
minus 8981b48cd2 very basic IPC implementation
simply executes the received data as command
2015-08-20 15:24:33 +02:00