mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
ipc: add tick event
This commit is contained in:
parent
33433c6434
commit
3edaf2ce2a
6 changed files with 44 additions and 1 deletions
|
|
@ -250,12 +250,16 @@ static void pretty_print(int type, json_object *resp) {
|
|||
if (type != IPC_COMMAND && type != IPC_GET_WORKSPACES &&
|
||||
type != IPC_GET_INPUTS && type != IPC_GET_OUTPUTS &&
|
||||
type != IPC_GET_VERSION && type != IPC_GET_SEATS &&
|
||||
type != IPC_GET_CONFIG) {
|
||||
type != IPC_GET_CONFIG && type != IPC_SEND_TICK) {
|
||||
printf("%s\n", json_object_to_json_string_ext(resp,
|
||||
JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED));
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == IPC_SEND_TICK) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == IPC_GET_VERSION) {
|
||||
pretty_print_version(resp);
|
||||
return;
|
||||
|
|
@ -384,6 +388,8 @@ int main(int argc, char **argv) {
|
|||
type = IPC_GET_BINDING_MODES;
|
||||
} else if (strcasecmp(cmdtype, "get_config") == 0) {
|
||||
type = IPC_GET_CONFIG;
|
||||
} else if (strcasecmp(cmdtype, "send_tick") == 0) {
|
||||
type = IPC_SEND_TICK;
|
||||
} else {
|
||||
sway_abort("Unknown message type %s", cmdtype);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,3 +64,6 @@ _swaymsg_ [options...] [message]
|
|||
|
||||
*get\_config*
|
||||
Gets a JSON-encoded copy of the current configuration.
|
||||
|
||||
*send\_tick*
|
||||
Sends a tick event to all subscribed clients.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue