aboutsummaryrefslogtreecommitdiff
path: root/sway/ipc.c
AgeCommit message (Collapse)Author
2015-11-27Move IPC client into common, refactor IPCDrew DeVault
2015-11-26Add "variant": "sway" to IPC version responseDrew DeVault
2015-11-13ipc: Store socketname in SWAYSOCK. Fixes `--get-socketpath`.S. Christoffer Eliesen
After adding pid to the socket path the `--get-socketpath` command broke because it doesn't know the pid of the running instance. Fix this by setting and querying `SWAYSOCK`. Also ignore `SWAYSOCK` upon normal startup if a socket exists at that location (ie. from another sway instance), and don't overwrite `I3SOCK` if it exists either.
2015-11-13ipc: Put socket into proper user runtime dir.S. Christoffer Eliesen
2015-11-12Start working on IPC for get_pixelsDrew DeVault
This is broken
2015-11-11Fix some IPC issuesDrew DeVault
Socket now includes pid in the filename (fixes nested sway sessions or old sockets causing problems). Fixed warnings on strict aliasing and cleaned up relevant code in general.
2015-10-27implemented IPC subscribe for workspace eventminus
2015-10-22ipc,commands,config: Replace cmd_status enum with cmd_results struct.S. Christoffer Eliesen
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-22ipc: Return correct status in ipc reply.S. Christoffer Eliesen
2015-10-16sway/ipc: Use sway_abort instead of returning NULL.S. Christoffer Eliesen
2015-10-16sway/ipc: ipc_user_sockaddr: Use sway_assert instead of assert.S. Christoffer Eliesen
2015-10-16sway/ipc: Fix whitespace.S. Christoffer Eliesen
2015-10-16sway/ipc: Free ipc_sockaddr upon termination.S. Christoffer Eliesen
2015-10-16sway/ipc: Support multiple users.S. Christoffer Eliesen
2015-10-16sway/ipc: Dynamically assign ipc_sockaddr.S. Christoffer Eliesen
2015-09-29return after disconnect ipc client and minor checkstaiyu
2015-09-13Revert "new_workspace null behavior + testmap functions + regex"Drew DeVault
This reverts commit e1d18e42a8f3a597b9bf5f1bb2ab6c346e4e7983. Fixes #180 cc @taiyu-len
2015-09-12new_workspace null behavior + testmap functions + regextaiyu
2015-09-07config modestaiyu
2015-09-02Remove stropts.h from ipc.cDrew DeVault
Apparently it's not required, and for some reason Fedora doesn't have it. Fixes #162
2015-08-26Added in better versioning infoLuminarys
2015-08-27converted IPC to use json-cminus
get_workspaces and get_outputs
2015-08-26added json-c lib and implemented IPC get_versionminus
2015-08-21fixed #108 signed/unsigned comparisonminus
2015-08-21Fix compiler warnings (which were really errors)Drew DeVault
2015-08-20added IPC messages get_workspaces and get_outputsminus
No escaping on container names is done yet, as well as some values are hardcoded because they don't exist yet.
2015-08-20set I3SOCK for i3-msg compatibilityminus
2015-08-20fixed formattingminus
2015-08-20added sway_terminate to exit cleanlyminus
2015-08-20set IPC client sockets to close on execminus
2015-08-20properly exit swayminus
- wlc_terminate() instead of exit(0) - unlink IPC socket
2015-08-20use env var SWAYSOCK if availableminus
or fall back to /tmp/sway-ipc.sock
2015-08-20properly handle IPC clientsminus
2015-08-20added i3-ipc support/parsingminus
2015-08-20very basic IPC implementationminus
simply executes the received data as command